busy-air-96466
08/23/2023, 4:40 PMnpm install growthbook --save
And package.json shows:
"growthbook": "^0.2.2",
The CLI doc says to run:
growthbook auth login --apiKey XXX
This doesn't work, giving an error:
command not found: growthbook
I looked at the github README:
https://github.com/growthbook/growthbook-cli#commands
Unfortunately, the code there also doesn't work for me:
npx growthbook auth login --apiKey
I see an error:
Cannot find module 'node:os'
Require stack:
- /xxx/node_modules/growthbook/node_modules/@oclif/core/lib/config/config.js
- /xxx/node_modules/growthbook/node_modules/@oclif/core/lib/config/index.js
I'm running node v14.16.1 and can't upgrade.
1. Does anyone know a way to run the CLI so I can use the types generation?
2. It'd be great to update the docs with the working command, and if there is a minimum version of node required, to make that information prominent?happy-autumn-40938
08/23/2023, 4:46 PMbusy-air-96466
08/23/2023, 4:57 PMbusy-air-96466
08/23/2023, 5:04 PMbetter-magician-65629
08/23/2023, 5:06 PMbusy-air-96466
08/23/2023, 5:11 PMhappy-autumn-40938
08/23/2023, 5:15 PMbusy-air-96466
08/23/2023, 5:16 PMbetter-magician-65629
08/23/2023, 5:26 PMgrowthbook
unless you've added local node_modules
to your path (or is run via an npm/yarn run
scriptbusy-air-96466
08/24/2023, 8:20 AMnvm install 16
nvm use 16
npm install -g growthbook
growthbook auth login --apiKey secret_admin_xxx
I'm getting this error:
What is the name of this profile? You can leave this blank (default: default):
› Error: :boom: Invalid GrowthBook config. Configure the CLI with the following
› command:
›
› $ growthbook auth login
better-magician-65629
08/24/2023, 4:54 PMhappy-autumn-40938
08/24/2023, 4:55 PMbetter-magician-65629
08/24/2023, 4:59 PMgrowthbook
anywhere on your system):
npm uninstall -g growthbook
npm install -g growthbook
or if you are installing it at the project level, update the version in your package.json to be 0.2.3 and re-run npm install
and use with npx growthbook
at your project root.busy-air-96466
08/24/2023, 5:32 PMnvm use 16
npm uninstall -g growthbook
npm install -g growthbook
This is on a Mac. It's been stuck at the same point for about 10 minutes.better-magician-65629
08/25/2023, 5:12 PMwhich node
and which npm
is it pointing to the right one?busy-air-96466
08/29/2023, 9:02 AMbetter-magician-65629
09/19/2023, 6:58 PM