ai-cli icon indicating copy to clipboard operation
ai-cli copied to clipboard

Error upon ai auth

Open 3rico opened this issue 3 years ago • 4 comments

I get the following error

`/usr/local/lib/node_modules/@abhagsain/ai-cli/node_modules/@oclif/core/lib/command.js:41 delete this.globalFlags?.json; ^

SyntaxError: Unexpected token '.' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/usr/local/lib/node_modules/@abhagsain/ai-cli/node_modules/@oclif/core/lib/index.js:6:19) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) `

3rico avatar Jan 11 '23 10:01 3rico

Can you please share your OS, Node version, and AI-CLI version?

abhagsain avatar Jan 11 '23 12:01 abhagsain

same here: Ubuntu 20.04 root@cnf:~# node -v v10.19.0 root@cnf:~# npm -v 6.14.4

heroes1412 avatar Jan 31 '23 11:01 heroes1412

Same here.

Ubuntu 22.04:

❯ node -v
v12.22.9
❯ npm -v
8.5.1

Ubuntu 20.04:

➜  npm -v
6.14.4
➜  node -v
v10.19.0

wtanksleyjr avatar Mar 07 '23 20:03 wtanksleyjr

Hello @wtanksleyjr , @3rico, @heroes1412

I was able to identify the issue. The node version required is >=14.0.0. So here is how I did:

  1. I installed initially then uninstalled it completely
  2. Later, I reinstalled and I go the warning that node version required is >=14.0.0
  3. I use the following Source to install the required version.

--> npm -v 6.14.18 --> node -v v14.21.3

I hope this helps.

Charlz91108112 avatar Mar 22 '23 06:03 Charlz91108112