Npm script works for pre-installation but not for preupdate

I have a script specified in .json packages for a node application.

the script runs fine when I do

npm install 

but not for

 npm update 

Excerpt from packages.json

 "scripts": { "start": "node app.js", "preinstall": "node scripts/install.js", "preupdate": "node scripts/install.js" } 

The whole file is located at https://github.com/Pike/outreach/blob/master/package.json .

+7
source share
1 answer

As I understand it, they turned off scripts to update npm (preupdate / postupdate) - something about best practice ...

This is a complete pain in the ass - they want you to use the node -gyp and .gyp files to build the node modules - it has a dependency on python! No thanks!

I am still chatting my head on the keyboard because we cannot install python on our production servers.

The Python update is available on most Linux distributions, not too much.

+5
source

All Articles