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?
Please uninstall node. js and use the Node v14. x. It will solve it automatically.
node-gyp is a tool that enables the compilation of native add-on modules for Node in multiple platforms. It has widespread use and is included as a dependency in many NPM packages. On most systems, this isn't an issue, and installing node-gyp with the rest of your packages works as expected.
To publish and install packages to and from the public npm registry or a private npm registry, you must install Node. js and the npm command line interface using either a Node version manager or a Node installer. We strongly recommend using a Node version manager like nvm to install Node. js and npm.
node-gyp dependencies If you only need to compile add-ons during the project setup, Node. js should cover it for you. However, if you are an add-on developer, you probably need to install node-gyp globally. To use node-gyp, first, we'll need to install a Python runtime, the make utility, and a C or C++ compiler.
You can do:
npm install --ignore-scripts
But it's not perfect because it prevents to execute all scripts from all dependencies.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With