Skip to content

[BUG] preshrinkwrap, shrinkwrap and postshrinkwrap scripts are not executed #2520

@LeSuisse

Description

@LeSuisse

Current Behavior:

With a package.json looking like that, preshrinkwrap, shrinkwrap and postshrinkwrap scripts are not executed when running npm install:

{
  "name": "mypackage",
  "version": "1.0.0",
  "dependencies": {
    "somedep": "^1.0.0"
  },
  "devDependencies": {},
  "scripts": {
    "preshrinkwrap": "mypreshrinkwrapscript",
    "shrinkwrap": "myshrinkwrapscript",
    "postshrinkwrap": "mypostshrinkwrapscript"
  }
}

Expected Behavior:

preshrinkwrap, shrinkwrap and postshrinkwrap scripts to be executed when running npm install as described in the documentation https://docs.npmjs.com/cli/v7/configuring-npm/package-locks

Note that this behavior works on npm 6.x.

Environment:

Node: 15.6.0
npm: 7.4.0

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 1high priority issueRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions