New CLI on OS X 10.11 El Capitan [SOLVED]

Yesterday the cli was working. Today I tried to update to the new release and I can't get it to install. Seems like a problem I remember having long ago

Failed at the serialport@4.0.7 install script 'node-pre-gyp install --fallback-to-build'.

I've been through the other notes on this site that I could find.

Could someone tell us the versions of node, npm, Python, and whatever else is needed to get the cli installed?

Thanks,
Jim

SOLUTION: Thanks to nrobinson2000 run this:

$ sudo npm install -g --unsafe-perm node-pre-gyp npm serialport particle-cli

3 Likes

@JSchrempp thanks for the report–we will investigate. Did you try the clean install command?

npm install -g particle-cli

cc @mdma @jvanier

Hi,
Yes that it what I did except with sudo.
Here's more, in case this helps...

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN excluding symbolic link test/server/static/ie8-polyfill.js -> ../../../ie8-polyfill.js
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
npm WARN excluding symbolic link test/server/static/ie8-polyfill.js -> ../../../ie8-polyfill.js
/usr/local/bin/particle -> /usr/local/lib/node_modules/particle-cli/bin/particle.js

serialport@4.0.7 install /usr/local/lib/node_modules/particle-cli/node_modules/serialport
node-pre-gyp install --fallback-to-build

env: node: No such file or directory
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "particle-cli"
npm ERR! node v6.9.4
npm ERR! npm v4.1.1
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! serialport@4.0.7 install: node-pre-gyp install --fallback-to-build
npm ERR! spawn ENOENT

1 Like

And I did try following the instructions here, but that article is really long with a lot of old try this / try that dialog. Hard to know if something is there that would help.

I have some trouble on Windows 10 too. It tells me to upgrade particle-cli, command runs with no apparent errors (few warnings), but nothing changes.

$ particle.exe
particle-cli v1.14.2

! A newer version (1.19.0) of particle-cli is available.
! Upgrade now by running: npm install -g particle-cli

After running npm install -g particle-cli, nothing changes. I tried to uninstall and reinstall particle-cli, but it installed 1.14.2 version again.

Also:

$ npm --version
2.15.1
1 Like

What versions of node and npm are you using?

Also, try doing:

$ sudo npm install -g node-pre-gyp npm serialport particle-cli

What version(s) are known to work?

Versions are listed in the output of my post above.

I am on macOS Sierra, and I have node v6.9.1 and npm 4.0.5 and everything is working smoothly.

Have you tried the command I suggested? (6.9.4 should work).

Thanks. I did try your command, same result. I see I’m on npm v4.1.1, but should that matter?

What if you try:

$ sudo npm install -g --unsafe-perm node-pre-gyp npm serialport particle-cli
4 Likes

You sir, are a wizard. That worked!

Thanks for the help.

1 Like

Quickly tested on macOS Sierra, had to reinstall node.js, but at the end it worked and I have 1.19.0 now.

1 Like

You are the man! Ive been trying to figure this out for so long

1 Like