Can not install from npm (problem with serialport package)
Closed this issue · 3 comments
I'm on Mac OS X, and I can not install from npm. here is the terminal output.
sudo npm install -g spark-cli
serialport@1.7.1 install /usr/local/lib/node_modules/spark-cli/node_modules/serialport
node-pre-gyp install --fallback-to-build
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EPERM, utime '/Users/nrobinson/.node-gyp/0.12.3'
gyp ERR! stack at Error (native)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.7.1/Release/node-v14-darwin-x64/serialport.node" "--module_name=serialport" "--module_path=/usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.7.1/Release/node-v14-darwin-x64"
gyp ERR! cwd /usr/local/lib/node_modules/spark-cli/node_modules/serialport
gyp ERR! node -v v0.12.3
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.7.1/Release/node-v14-darwin-x64/serialport.node --module_name=serialport --module_path=/usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.7.1/Release/node-v14-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/spark-cli/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
node-pre-gyp ERR! System Darwin 14.3.0
node-pre-gyp ERR! command "node" "/usr/local/lib/node_modules/spark-cli/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/spark-cli/node_modules/serialport
node-pre-gyp ERR! node -v v0.12.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.7
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.7.1/Release/node-v14-darwin-x64/serialport.node --module_name=serialport --module_path=/usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.7.1/Release/node-v14-darwin-x64' (1)
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "spark-cli"
npm ERR! node v0.12.3
npm ERR! npm v2.9.1
npm ERR! code ELIFECYCLE
npm ERR! serialport@1.7.1 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@1.7.1 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/nrobinson/Downloads/spark-cli-master/npm-debug.log
MacBook-Pro:spark-cli-master nrobinson$
Hey @nrobinson2000!
Sorry to hear you're having trouble! Do you by chance have the Xcode Command Line Tools installed?
I fixed it and installed the Particle-cli.
I just needed to
####sudo npm install serialport
ah hah!
I will add this to our documentation. We should definitely mention that prominently.
Thanks for the report, @nrobinson2000! I'm glad you got it fixed 😸