-
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
Installation of Local Filesystem tgz Modules Fails in 0.23 #3168
Comments
Hi, I stumbled on this issue too. Here is a script to reproduce it quickly: YARN=yarn
rm -rf /tmp/yarntest
mkdir /tmp/yarntest
cd /tmp/yarntest
mkdir a
cd a
echo '{ "name": "a", "version": "1.0.0", "dependencies": { "b": "file:../b/b-v1.0.0.tgz" } }' > package.json
mkdir /tmp/yarntest/b
cd /tmp/yarntest/b
echo '{ "name": "b", "version": "1.0.0" }' > package.json
yarn pack
cd ../a
"$YARN" install |
Removed previous comment. |
@tibdex, thanks a lot for the repro steps, helped a lot. |
The issue doesn't come from this commit. Apparently, when the code reaches this line, the tarball isn't available in the cache yet (but I've checked, and it is when the command complete! weird). Will investigate. [edit] Wait, we shouldn't even enter this function, since the fetcher is supposed to be LocalTarballFetcher... |
* Fixes #3168 * Adds tests * Fixes linting
@bestander I see that you closed this issue but I can still reproduce it 100% of the time with the latest version of Yarn (0.25.2) by simply adding one step to the scenario above: yarn add file:third/my-file.tgz
yarn add v0.25.2
[1/4] 🔍 Resolving packages...
error An unexpected error occurred: "http://registry.npmjs.org/third/myfile.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. Any pointers? I can try to see if I can fix it and create a PR if you feel it's still a legit issue. Thanks! |
Does relative path work?
|
Ah! It does work indeed! |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Version 0.23 breaks installation of local filesystem tgz files where 0.22 functioned as expected.
If the current behavior is a bug, please provide the steps to reproduce.
The above excerpt from a package.json functions in 0.22 but fails in 0.23 as it attempts to find the package by the full name, including tgz on npm with the following error:
What is the expected behavior?
Yarn should respect
file:
references to.tgz
files.Please mention your node.js, yarn and operating system version.
I originally mentioned this issue on this pull request as it was dealing with files:
#2723
I can provide the full package.json or whatever other information you require.
The text was updated successfully, but these errors were encountered: