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 the package.json file defines a prepare script (e.g. to transpile source code), this will be correctly executed while packing and publishing. However, it will again be executed by the consumer that tries to install the package, which then most likely fails. In the npm docs:
prepare: Run both BEFORE the package is packed and published, on local npm install without any arguments, and when installing git dependencies
As a simple workaround, a publish-to-git user could use prepublish instead of prepare, which is almost the same except it is not executed when installing from a git dependency.
Perhaps publish-to-git could automatically remove the prepare script from package.json, or rename it to prepublish, or simply throw a warning when it is present.
The text was updated successfully, but these errors were encountered:
If the
package.json
file defines aprepare
script (e.g. to transpile source code), this will be correctly executed while packing and publishing. However, it will again be executed by the consumer that tries to install the package, which then most likely fails. In the npm docs:As a simple workaround, a publish-to-git user could use
prepublish
instead ofprepare
, which is almost the same except it is not executed when installing from a git dependency.Perhaps publish-to-git could automatically remove the
prepare
script frompackage.json
, or rename it toprepublish
, or simply throw a warning when it is present.The text was updated successfully, but these errors were encountered: