- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.8k
 
Description
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 
prepackto run the steps needed to build it (f.e. build fromsrc/todist/). Make sure thisprepackscript relies on executables installed as dev dependencies. - Make another project that depends on the dependency from git.
 - Run 
npm installin the project that depends on the git dependency. - The 
prepackstep 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!