-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Hi,
npm publish --dry-run
calls the package.json script "prepublishOnly"- "prepublishOnly" executes a bash script:
./prepublish.sh
./prepublish.sh
does the following:
#!/bin/bash
rm -fr node_modules
npm install .
npm run build
- The
./prepublish.sh
fails, not findingtsc
, and actually thenode_modules
directory is missing!
So it seems to me that somehow the npm commands run by the ./prepublish.sh
script inherits the "--dry-run" option.
Is this the expected behavior?
IMHO it should be not, and older versions did work properly as far as I remember.
Or, at least, there should be an option to not inherit dry-run behavior.
Please note that if I run the ./prepublish.sh
script, it works fine. This behavior happens only when running npm publish --dry-run
.
Regards
Expected Behavior
npm commands should perform what explicitly told to do.
Or there should be a way to perform the install-and-build check performed by my script.
Steps To Reproduce
Already posted before
Environment
- npm: 8.4.1
- Node.js: 17.1.0
- OS Name: Linux
- System Model Name: Debian Testing
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release