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
When dependency is installed from source (i.e. via git+ssh://...) the prepare script is executed, but devDependencies of the dependency are not installed. In the majority of packages that provide the prepare script, dev dependencies are required to successfully execute it.
If the current behavior is a bug, please provide the steps to reproduce.
Create a new dir with package.json in it.
Add any package that provides prepare script and uses it's own dev dependencies to implement the prepare script.
yarn install
The build will end up with the incorrect result.
What is the expected behavior?
Not sure how exactly, but we have to install the devDependencies (in addition to just their regular dependencies) of our dependencies (any kind, i.e. regular dependencies, dev, optional, etc) when we'll be running the prepare script from the dependency.
In particular when we install packages from git.
Please mention your node.js, yarn and operating system version.
@MOZGIII I've used https://github.com/exogen/postinstall-build in the past, but they recommend using prepare instead. I tried using it, and found that it's not working, probably for the reason you specify here. I'd definitely be interested in hearing whether the maintainers see this as a bug or intended behavior.
Tbh, this might actually already be working, so we need to double-check. I had a pretty complicated setup, but it might not be the real reason I had issues (and this might not be broken). It would be great if someone tried to reproduce it in the cleanroom environment.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When dependency is installed from source (i.e. via
git+ssh://...
) theprepare
script is executed, butdevDependencies
of the dependency are not installed. In the majority of packages that provide theprepare
script, dev dependencies are required to successfully execute it.If the current behavior is a bug, please provide the steps to reproduce.
package.json
in it.prepare
script and uses it's own dev dependencies to implement theprepare
script.yarn install
The build will end up with the incorrect result.
What is the expected behavior?
Not sure how exactly, but we have to install the
devDependencies
(in addition to just their regulardependencies
) of our dependencies (any kind, i.e. regular dependencies, dev, optional, etc) when we'll be running theprepare
script from the dependency.In particular when we install packages from git.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: