Closed func0der closed 2 months ago
for this package.json version hook runs fine.
{
"name": "rep",
"version": "1.0.3",
"main": "index.js",
"scripts": {
"version": "echo \"testing version hook\""
},
"author": "",
"license": "ISC",
"keywords": [],
"description": ""
}
~/workarea/rep $ npm version patch
> version
> echo "testing version hook"
testing version hook
v1.0.3
~/workarea/rep $ npm -v
10.8.2
@func0der when you install a pacakge
then scripts mentioned inside that pacakge
's package.json file will execute, in your case it should run the scripts of license-checker
when you install that package, but I believe that you are expecting that npm install license-checker
will run the script of failing
which it will not execute, as mentioned in my previous comment the version script is working fine. If you still think there is something I missed, please provide your test setup, complete re-production steps, logs etc.
Closing. If this is still a problem please feel free to reopen this issue, or create a new issue w/ steps to reproduce.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
No livecycle hooks (https://docs.npmjs.com/cli/v10/using-npm/scripts#life-cycle-operation-order) are run at all.
Expected Behavior
Livecycle hooks are run
Steps To Reproduce
Create package.json
Run 'npm install license-checker --foreground-scripts --verbose'
See nothing. No postinstall or preinstall or any hooks are executed.
Actually all hooks seem to not be working. Tested it with the
version
hooks, too.Environment