You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a git-hosted dependency then it needs to be built. I don't think this can be changed. All we can do is to throw an exception if there is a git-hosted dependency that needs to be built and ignore-scripts is used.
This is absolutely incorrect. See npm/npm#10074. The entire purpose of prepublishOnly existing (rather than prepublish) is to not do this. What you are looking for is prepare.
Runs BEFORE the package is packed, i.e. during npm publish and npm pack
Runs on local npm install without any arguments
NOTE: If a package being installed through git contains a prepare script, its dependencies and devDependencies will be installed, and the prepare script will be run, before the package is packaged and installed.
prepublishOnly
Runs BEFORE the package is prepared and packed, ONLY on npm publish.
Expected Behavior
prepublishOnly should NEVER, EVER be run on any kind of install. It should only be run if the user is actuallypublishing.
Which Node.js version are you using?
16.20.1
Which operating systems have you used?
macOS
Windows
Linux
If your OS is a Linux based, which one it is? (Include the version if relevant)
Debian 11
The text was updated successfully, but these errors were encountered:
Verify latest release
pnpm version
8.7.1
Which area(s) of pnpm are affected? (leave empty if unsure)
Hooks
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
foo
with a prepublishOnly script and push to githubpnpm i github:foobar/foo
Describe the Bug
When installing from git/github pnpm runs the prepublishOnly script. This will almost certainly fail.
In #5876 (comment) @zkochan posted this:
This is absolutely incorrect. See npm/npm#10074. The entire purpose of
prepublishOnly
existing (rather thanprepublish
) is to not do this. What you are looking for isprepare
.See https://docs.npmjs.com/cli/v9/using-npm/scripts:
Expected Behavior
prepublishOnly
should NEVER, EVER be run on any kind of install. It should only be run if the user is actually publishing.Which Node.js version are you using?
16.20.1
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
Debian 11
The text was updated successfully, but these errors were encountered: