npm: disable postinstall script for package
It's not possible to disable only postinstall
scripts. However, you can disable all scripts using:
$ npm install --ignore-scripts
As delbertooo mentionned in the comments, this also disables the scripts of the dependencies.
You can also enable the settings in npm configuration file.
npm config set ignore-scripts true
Note: This will disable scripts for all NPM packages.