What
When a project has a dependency from git that has a prepack script (instead of a prepare script), the prepack step of the git dependency fails because dev dependencies are not present to the prepack script.
This issue is not happening if the git dependencies use prepare instead of prepack.
When
Whenever I run npm install in my project, and the git dependencies have a prepack script instead of a prepare script.
Where
Git dependencies. I haven't made a public reproduction yet.
How
Publish a package in a git repo. Make sure it uses prepack in its package.json to define the steps needed to build the projects into usable state.
Current Behavior
My project's npm install fails because a git dependency's prepack script fails to find the commands that it uses.
If I fork the git dependency and modify it to use prepare, then things work great.
Steps to Reproduce
- Publish a package as a git repo
- Make sure the package uses
prepack to run the steps needed to build it (f.e. build from src/ to dist/). Make sure this prepack script relies on executables installed as dev dependencies.
- Make another project that depends on the dependency from git.
- Run
npm install in the project that depends on the git dependency.
- The
prepack step in the git dependency should fail.
Expected Behavior
prepack should work the same as prepare in this regard.
Who
Me, but hopefully I'm not the only one!
What
When a project has a dependency from git that has a
prepackscript (instead of apreparescript), theprepackstep of the git dependency fails because dev dependencies are not present to theprepackscript.This issue is not happening if the git dependencies use
prepareinstead ofprepack.When
Whenever I run
npm installin my project, and the git dependencies have aprepackscript instead of apreparescript.Where
Git dependencies. I haven't made a public reproduction yet.
How
Publish a package in a git repo. Make sure it uses
prepackin its package.json to define the steps needed to build the projects into usable state.Current Behavior
My project's
npm installfails because a git dependency'sprepackscript fails to find the commands that it uses.If I fork the git dependency and modify it to use
prepare, then things work great.Steps to Reproduce
prepackto run the steps needed to build it (f.e. build fromsrc/todist/). Make sure thisprepackscript relies on executables installed as dev dependencies.npm installin the project that depends on the git dependency.prepackstep in the git dependency should fail.Expected Behavior
prepackshould work the same aspreparein this regard.Who
Me, but hopefully I'm not the only one!