node-pre-gyp install error
See original GitHub issuezjuwjfdeMacBook-Pro:dsl2 zjuwjf$ tnpm install canvas@next
✔ Installed 1 packages
✔ Linked 66 latest versions
node-pre-gyp http GET https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.0.0-alpha.13/canvas-prebuilt-v2.0.0-alpha.13-node-v64-darwin-unknown-x64.tar.gz
node-pre-gyp http 302 https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.0.0-alpha.13/canvas-prebuilt-v2.0.0-alpha.13-node-v64-darwin-unknown-x64.tar.gz
node-pre-gyp ERR! Completion callback never invoked!
node-pre-gyp ERR! System Darwin 16.7.0
node-pre-gyp ERR! command “/usr/local/Cellar/node/10.1.0/bin/node” “/Users/zjuwjf/idlefish-git/dsl2/node_modules/_canvas@2.0.0-alpha.13@canvas/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build”
node-pre-gyp ERR! cwd /Users/zjuwjf/idlefish-git/dsl2/node_modules/_canvas@2.0.0-alpha.13@canvas
node-pre-gyp ERR! node -v v10.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! This is a bug in node-pre-gyp.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! https://github.com/mapbox/node-pre-gyp/issues
✖ Install fail! Error: post install error, please remove node_modules before retry!
Run “sh -c node-pre-gyp install --fallback-to-build” error, exit code 6
Error: post install error, please remove node_modules before retry!
Run “sh -c node-pre-gyp install --fallback-to-build” error, exit code 6
at ChildProcess.proc.on.code (/usr/local/lib/node_modules/tnpm/node_modules/_runscript@1.3.0@runscript/index.js:74:21)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
npminstall version: 3.7.0
npminstall args: /usr/local/Cellar/node/10.1.0/bin/node /usr/local/lib/node_modules/tnpm/node_modules/_npminstall@3.7.0@npminstall/bin/install.js --tmp=/Users/zjuwjf/.tnpm_tmp --no-proxy --disturl=https://tnpm-hz.oss-cn-hangzhou.aliyuncs.com/dist/node --userconfig=/Users/zjuwjf/.tnpmrc --registry=http://registry.npm.alibaba-inc.com canvas@next --china --prefix=/usr/local --forbidden-licenses=AGPL,CPAL,OSL --fix-bug-versions
[tnpm] subprocess:/usr/local/lib/node_modules/tnpm/node_modules/_npminstall@3.7.0@npminstall/bin/install.js exit code: 1, signal: null
[tnpm] mainprocess exit code: 1
=============================================================
node -v v10.3.0
tnpm -v tnpm@5.13.1 (/usr/local/lib/node_modules/tnpm/bin/tnpm.js) npm@5.10.0 (/usr/local/lib/node_modules/tnpm/node_modules/_npm@5.10.0@npm/lib/npm.js) node@10.3.0 (/usr/local/Cellar/node/10.1.0/bin/node) npminstall@3.7.0 (/usr/local/lib/node_modules/tnpm/node_modules/_npminstall@3.7.0@npminstall/lib/index.js) prefix=/usr/local (load prefix from: $ npm config get prefix) darwin x64 16.7.0 registry=http://registry.npm.alibaba-inc.com package.engines={} (package.json: /Users/zjuwjf/idlefish-git/dsl2)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:10

Top Related StackOverflow Question
The problem was the RPi didn’t have pkg-config installed - once I got that everything worked - with the odd warning… Thanks for your support, John.
hi i have been trying to restore my node-red system on my raspberry Pi-0-W for a few days now with successive failures due to unavailable resources for node-pre-gyp I started with the current version of node.js and node red installed via the nodered.org pi page. Hit the problem looked it up and found some folk using a Pi3b or 3B+ had success after downgrading to node8. so i started with a new raspbian-lite install and installed node.js 8 and then node red, installed my nodes and again no node-pre-gyp resourses resulting in a rolback/fallback build with known issues in the nobel/debug resources that the node i need ‘node-red-contrib-Xiaomi-ble’ fails to install with resulting in an unresolvable npm audit err…
I have now followed Pete scargills suggestion to downgrade to node 6, – still the same issue…
an attempt to install pkg-config failed too raising a screen full of Blood red compile errors before crashing out with exit condition 1.
On a fresh install the errors are reported around problems with bluetooth-hci-socket, as i start trying to fix this with attempts to install bluetooth-hci-socket and usb and their respective prerequisites the errors soon solidify to
-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz node-pre-gyp WARN Pre-built binaries not found for usb@1.5.0 and node@10.15.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
which will result in the nobel/debug V2.0 installed while the xiaomi-ble node requires the bug fixed V2.6.9 of nobel/debug to install…
and around and around i have been going… Please advise???