its pretty much the same on all platforms though. on debian i think i had to symlink “node” to “nodejs” as one of the spark dependencies expected a binary called “node”.
Hi
Installing node.js on MacOS 10.9 doesn’t seem to have installed all that I need, or at least in the expected places:
(and, /usr/local/bin is in my PATH)
$ sudo node npm install -g spark-cli
module.js:340
throw err;
^
Error: Cannot find module '/Users/raymond/Downloads/npm’
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-pre-gyp: command not found
npm ERR! serialport@1.4.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the serialport@1.4.0 install script.
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! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "spark-cli"
npm ERR! cwd /Users/raymond/Downloads/windoze
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/raymond/Downloads/windoze/npm-debug.log
npm ERR! not ok code 0
$ sudo npm install -g serialport
/usr/local/bin/serialportlist -> /usr/local/lib/node_modules/serialport/bin/serialportList.js
/usr/local/bin/serialportterm -> /usr/local/lib/node_modules/serialport/bin/serialportTerminal.js
serialport@1.4.0 install /usr/local/lib/node_modules/serialport
node-pre-gyp install --fallback-to-build
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-pre-gyp: command not found
npm ERR! serialport@1.4.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the serialport@1.4.0 install script.
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! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "serialport"
npm ERR! cwd /Users/raymond/Downloads/windoze
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/raymond/Downloads/windoze/npm-debug.log
npm ERR! not ok code 0
Thanks - once the CLI was installed, everything else worked like a charm. I am on a Wifi network that does not permit point-to-point connections within the local network and due to this the wireless setup for my Core was unable to complete. I set the network via USB and all is well!
I’m getting the same error on the serialport portion of the install. I tried making the symlink, but it didn’t seem to help. Can you explain a little more what that link is actually doing? Running the sudo npm install node-pre-gyp worked fine, but didn’t fix the serialport errors.
Error message below:
$ sudo npm install -g spark-cli
> serialport@1.4.0 install /usr/local/lib/node_modules/spark-cli/node_modules/serialport
> node-pre-gyp install --fallback-to-build
child_process: customFds option is deprecated, use stdio instead.
gyp ERR! configure error|
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at maybeClose (child_process.js:999:16)
gyp ERR! stack at Socket.<anonymous> (child_process.js:1167:11)
gyp ERR! stack at Socket.emit (events.js:107:17)
gyp ERR! stack at Pipe.close (net.js:461:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--name=serialport" "--configuration=Release" "--module_name=serialport" "--version=1.4.0" "--major=1" "--minor=4" "--runtime=node" "--node_abi=node-v14" "--platform=darwin" "--target_platform=darwin" "--arch=x64" "--target_arch=x64" "--module_main=./serialport" "--host=https://node-serialport.s3.amazonaws.com/" "--module_path=/usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.4.0/Release/node-v14-darwin-x64" "--remote_path=./serialport/v1.4.0/Release/" "--package_name=node-v14-darwin-x64.tar.gz" "--staged_tarball=build/stage/serialport/v1.4.0/Release/node-v14-darwin-x64.tar.gz" "--hosted_path=https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/" "--hosted_tarball=https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/node-v14-darwin-x64.tar.gz"
gyp ERR! cwd /usr/local/lib/node_modules/spark-cli/node_modules/serialport
gyp ERR! node -v v0.11.14-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node rebuild --name=serialport --configuration=Release --module_name=serialport --version=1.4.0 --major=1 --minor=4 --runtime=node --node_abi=node-v14 --platform=darwin --target_platform=darwin --arch=x64 --target_arch=x64 --module_main=./serialport --host=https://node-serialport.s3.amazonaws.com/ --module_path=/usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.4.0/Release/node-v14-darwin-x64 --remote_path=./serialport/v1.4.0/Release/ --package_name=node-v14-darwin-x64.tar.gz --staged_tarball=build/stage/serialport/v1.4.0/Release/node-v14-darwin-x64.tar.gz --hosted_path=https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/ --hosted_tarball=https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/node-v14-darwin-x64.tar.gz' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/spark-cli/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:76:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:999:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1071:5)
node-pre-gyp ERR! System Darwin 13.2.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.11.14-pre
node-pre-gyp ERR! node-pre-gyp -v v0.5.19
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node rebuild --name=serialport --configuration=Release --module_name=serialport --version=1.4.0 --major=1 --minor=4 --runtime=node --node_abi=node-v14 --platform=darwin --target_platform=darwin --arch=x64 --target_arch=x64 --module_main=./serialport --host=https://node-serialport.s3.amazonaws.com/ --module_path=/usr/local/lib/node_modules/spark-cli/node_modules/seth=./serialport/v1.4.0/Release/ --package_name=node-v14-darwin-x64.tar.gz --staged_tarball=build/stage/serialport/v1.4.0/Release/node-v14-darwin-x64.tar.gz --hosted_path=https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/ --hosted_tarball=https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/node-v14-darwin-x64.tar.gz' (1)
npm ERR! serialport@1.4.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@1.4.0 install script.
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! System Darwin 13.2.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "spark-cli"
npm ERR! cwd /usr/bin
npm ERR! node -v v0.11.14-pre
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/bin/npm-debug.log
npm ERR! not ok code 0