question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node-pre-gyp install error

See original GitHub issue

zjuwjfdeMacBook-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:open
  • Created 5 years ago
  • Reactions:13
  • Comments:10

github_iconTop GitHub Comments

2reactions
smaddscommented, Oct 1, 2018

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.

node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.3.3/usb_bindings-v1.3.3-node-v57-linux-arm.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for usb@1.3.3 and node@8.12.0 (node-v57 ABI, glibc) (falling back to source compile with node-gyp) 
make: Entering directory '/home/simon.maddox/.node-red/node_modules/usb/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
  AR(target) Release/obj.target/usb.a
  COPY Release/usb.a
  CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc: In function ‘void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)’:
../src/node_usb.cc:151:58: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
  Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
                                                          ^
In file included from ../src/helpers.h:3:0,
                 from ../src/node_usb.h:21,
                 from ../src/node_usb.cc:1:
../../nan/nan.h:1000:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
  CXX(target) Release/obj.target/usb_bindings/src/device.o
../src/device.cc: In static member function ‘static void Req::default_after(uv_work_t*)’:
../src/device.cc:237:64: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
    Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
                                                                ^
In file included from ../src/helpers.h:3:0,
                 from ../src/node_usb.h:21,
                 from ../src/device.cc:1:
../../nan/nan.h:958:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
  CXX(target) Release/obj.target/usb_bindings/src/transfer.o
../src/transfer.cc: In function ‘void handleCompletion(Transfer*)’:
../src/transfer.cc:126:72: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
                                                                        ^
In file included from ../src/helpers.h:3:0,
                 from ../src/node_usb.h:21,
                 from ../src/transfer.cc:1:
../../nan/nan.h:958:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
  COPY Release/usb_bindings.node
  COPY /home/simon.maddox/.node-red/node_modules/usb/src/binding/usb_bindings.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/simon.maddox/.node-red/node_modules/usb/build'

1reaction
hunnimonstrcommented, Feb 15, 2019

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???

Read more comments on GitHub >

github_iconTop Results From Across the Web

`node-pre-gyp install --fallback-to-build` failed during MeanJS ...
i have tried upgrading node-gyp: sudo npm install -g node-gyp. It worked for me. I find the solution here, I hope it can...
Read more >
node-pre-gyp install --fallback-to-build · Issue #477 - GitHub
When installing sqlite3, npm fails on node-pre-gyp with error: node-pre-gyp ERR! Completion callback never invoked! node-pre-gyp ERR!
Read more >
`node-pre-gyp install --fallback-to-build` on Linux - YouTube
How to install bcrypt on Windows and Linux The steps are as follows : Install stable version of node withsudo npm cache clean...
Read more >
Getting a lot of errors when running npm install - Treehouse
When running npm install, it gets to a certain point in the process ... source compile with node-gyp) npm ERR! node-pre-gyp WARN Hit...
Read more >
node-pre-gyp - npm
Node.js native addon binary install tool. Latest version: 0.17.0, last published: 2 years ago. Start using node-pre-gyp in your project by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found