melvincarvalho / rdf-shell

rdf shell
MIT License
2 stars 1 forks source link

node: not found on Ubuntu 16.04 #13

Open stain opened 7 years ago

stain commented 7 years ago

npm -g install rdf-shell fails on Ubuntu 16.04 if it does not have the legacy /usr/bin/node command (it's now called nodejs)

gyp ERR! System Linux 4.4.0-43-Microsoft
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/rdf-shell/node_modules/bufferutil
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.2.1 Exit status 1

> utf-8-validate@1.2.2 install /usr/local/lib/node_modules/rdf-shell/node_modules/utf-8-validate
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-43-Microsoft
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/rdf-shell/node_modules/utf-8-validate
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

using "Ubuntu 16.04" (not really) bash in Windows 10. If I do ln -s /usr/bin/nodejs /usr/local/bin/node it works. Perhaps updating utf-8-validate@1.2.2 dependency or ws@0.8.1will be sufficient?