Pike
Pike

Reputation: 166

npm script running for preinstall, but not for preupdate

I have a script referenced in packages.json for a node app.

The script is run fine when I do

npm install

but not for

npm update

The excerpt from packages.json is

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

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

Upvotes: 7

Views: 3155

Answers (1)

qodeninja
qodeninja

Reputation: 11266

As I understand it they've disabled the scripts for npm update (preupdate/postupdate) -- something about best practice...

It's a complete pain in the ass -- they want you to use node-gyp and .gyp files for building node modules -- it has a dependency on python! No thanks!

I'm still banging my head on the keyboard over this -- since we cant install python on our production servers.

Update Python is available on most Linux Distros, not too much of a big deal

Upvotes: 5

Related Questions