-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn does not run prepack
when installing Git dependencies
#5047
Comments
This is a primary reason i've avoided git deps as a forking mechanism considering their behavior then changes due to differences in .gitignore vs .npmignore. This idea sounds like a great solution to the primary concerns. However, postpack also needs to be ran!! I use this script I wrote in postpack: https://github.com/aikar/json-object/blob/master/build/postpack.sh This modifies the tarball, moving all dist/* down a level so that non entry point imports can be clean import bar from "foo/bar"; instead of from "foo/dist/bar"; If my library was to be imported as a git repo, this would result in a different file structure. |
Hey there, I've just came across with this issue, @rally25rs you marked it with the label |
Are there any plans on tackling this? Does anyone know if there is a work around? |
Due to yarnpkg/yarn#5047, prepack doesnt get triggered with yarn so we cant do direct git installs in a consistent way unfortunately.
Closing as it's been fixed in the v2. |
@paul-soporan Would it make sense to reopen this issue and use it to track backporting a fix to yarn 1.x? Migrating to yarn 2 is great for when that can happen, but it doesn't seem like a trivial amount of effort. |
@masaeedu 1.x is frozen, which means that only security fixes are going to be merged. "backporting a fix to yarn 1.x" isn't really a thing as classic and modern are two entirely different codebases with different architectures, so such a fix would have to be implemented in an entirely different way for Yarn 1.x. |
This is weird. On WSL2 ubuntu prepack is working and run build script. On Docker image node:12/14 slim/alpine it's not. I'm using yarn 3.0.2. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
The dependency's
prepack
script is not run when installing a dependency that includes one.If the current behavior is a bug, please provide the steps to reproduce.
Install a dependency via git that specifies a
prepack
script. NPM documentation specifically mentions this: https://docs.npmjs.com/misc/scriptsWhat is the expected behavior?
The prepack script is executed.
Please mention your node.js, yarn and operating system version.
› node -v
v8.1.4
› yarn -v
1.3.2
The text was updated successfully, but these errors were encountered: