Reputation: 10498
I do a node-gyp rebuild in my post install scripts. Running node-gyp rebuild during will error out. How can I run npm install without node-gyp rebuild?
Upvotes: 12
Views: 8857
Reputation: 63
Well if you don't want to install using npm install --ignore-scripts
a for some reason use npm install only, you can override install script in package.json by some noop. For example:
"scripts" : {
"install" : "echo"
}
works like a charm (tested with yarn too)
Upvotes: 2
Reputation: 23752
You can do:
npm install --ignore-scripts
But it's not perfect because it prevents to execute all scripts from all dependencies.
Upvotes: 7
Reputation: 10498
package.json under scripts do this:
"scripts": {
"install": "install -d $(pwd)"
}
Upvotes: -3