npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

postinstall script isn't running when calling npm install

I’m trying to set up some automation scripts to run anytime a new package is installed from npm using the npm-cli. I wrote the scripts into postinstall under the scripts section of my package.json but it doesn’t seem to be called when running npm install. I tested with running yarn in stead of npm and yarn executes my scripts as expected.

Is this intended behavior or am I doing something incorrect?

I am running npm-cli version 6.4.1.

Thank you!