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 versions, you can just run npm install in this directory and npm will run node-gyp rebuild for you.

cd ~/Projects/your-nodejs-native-module/
npm install

Leave a Comment