[Solved] Problem installing aecli

I am failling to run/install aecli on my Mac. I had a June '19 version running but after upgrading to 2.6 it crashes with

aecli --version
internal/modules/cjs/loader.js:775
    throw err;
    ^

Error: Cannot find module 'commander'
Require stack:
- /Users/hd/aepp-cli-js/bin/aecli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
    at Function.Module._load (internal/modules/cjs/loader.js:677:27)
    at Module.require (internal/modules/cjs/loader.js:830:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at Object.<anonymous> (/Users/hd/aepp-cli-js/bin/aecli.js:24:17)
    at Module._compile (internal/modules/cjs/loader.js:936:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:999:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/hd/aepp-cli-js/bin/aecli.js' ]
}

I tried to install ‘commander’ manually but that fails, too.

install commander --save
npm WARN npm npm does not support Node.js v12.10.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN [email protected] requires a peer of [email protected]>=2 but none is installed. You must install peer dependencies yourself.
npm WARN @aeternity/[email protected] No repository field.

npm ERR! Invalid Version: Error: ENOENT: no such file or directory, open '/usr/local/lib/node_modules/npm/package.json'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/hd/.npm/_logs/2019-12-18T14_17_05_697Z-debug.log

/usr/local/lib/node_modules/npm/package.json does in fact not exist, the directory does. But my npm stuff tends to end up in ./node_modules/ instead (not /usr/local/lib/node_modules).

Any pointers? Thanks!

Maybe the issue is on your setup, as the error message suggests:

npm WARN npm npm does not support Node.js v12.10.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/

Othwerwise did you try to reinstall? npm i -g @aeternity/aepp-cli

I am sure it’s my setup. It’s npm (?) warning that node is too old and then contradicting itself first obviously, then encouraging to download exactly the version that it complains about.

You can find the latest version at https://nodejs.org/
/usr/local/Cellar/node/12.10.0/bin/aecli

Since I recall downloading npm and node for aeternity I thought I can’t have done anything breaking it on my side. But I’ll dig into that if it’s the only thing that comes to mind.

I had tried re-installing but that had no effect.

I’ll try to go back to an older version of aecli for now.

Got it fixed re-installing node + npm (going to v 13 in the process), using

brew install --verbose --debug npm

to find the post install problem that existed (/usr/local/lib rights) and

npm i -g @aeternity/aepp-cli

to re-build aecli.

Thanks

1 Like

Great to hear, thanks for the feedback