Current Behavior:
npm install script defined in package.json not running when I do npm install <packg> to install <packg> as dependency
Expected Behavior:
npm install command should run install script
Steps To Reproduce:
I created a npm package named cordova-import-npm with this script portion in package.json:
"scripts": {
"install": "echo \"HI THERE\""
},
When I run npm install . inside the root of the package it works
$ npm i .
> cordova-import-npm@1.0.10 install
> echo "HI THERE"
HI THERE
up to date, audited 231 packages in 1s
48 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
But when I install as dependency on another package, the script is not run
$ mkdir test/ && cd test/
$ npm init
$ npm install cordova-import-npm
up to date, audited 11 packages in 2s
found 0 vulnerabilities
I'm using the latest version of npm 7.9.0
Environment:
- OS: Ubuntu 18.04
- Node: 14.6.1
- npm: 7.9.0
Current Behavior:
npm install script defined in
package.jsonnot running when I donpm install <packg>to install<packg>as dependencyExpected Behavior:
npm install command should run
installscriptSteps To Reproduce:
I created a npm package named
cordova-import-npmwith this script portion inpackage.json:When I run
npm install .inside the root of the package it worksBut when I install as dependency on another package, the script is not run
I'm using the latest version of npm 7.9.0
Environment: