when trying to configure or rebuild node-gyp, getting errors: mac osx mavericks

You are trying to run node-gyp rebuild in current working directory (CWD) /usr/local/bin so the node-gyp can not find binding at /usr/local/bin/binding.gyp. Navigate your terminal to a directory which contains NodeJS module and only then run node-gyp rebuild. cd ~/Projects/your-nodejs-native-module/ node-gyp rebuild BTW I am not sure from which node version exactly but in modern … Read more

How to prevent node-gyp from downloading node-headers.tar.gz and node.lib from internet?

For those running on Windows where –tarball is useless because node-gyp subsequently wants to download the node.lib file… Here was my solution, hope to help anyone else stuck behind corporate barriers. I’m using v16.2.0 as an example, so swap with your appropriate node version. Create a folder you’re happy to house 16.2.0 data and point … Read more

npm install fails with error C2373 with vs2015 update 3

This error stays in relation with npm, node-gyp and Visual Studio 2015 and is already fixed in node-gyp@3.4.0, but npm is still pointing to an old version. As I workaround I can propose this: Go to your folder where npm is installed, e.g.: C:\Program Files\nodejs\node_modules\npm Open: package.json Remove entry for node-gyp in bundleDependencies Bump version … Read more

Why is node-gyp rebuild failing on Mac OSX El Capitan

Anytime i upgrade OSX to newer version, I get the same issue. Here is how i solve it every time: sudo rm -rf /Library/Developer/CommandLineTools xcode-select –install That’s it. Now next time you do npm install or yarn it’ll work. PS: Sometimes you won’t be able to install the command line tool through Xcode-select, for example … Read more