Skip to content
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

[Bug] lodash.zip gets confused for a zip archive #2975

Closed
hlolli opened this issue Jun 2, 2021 · 5 comments · Fixed by #3042
Closed

[Bug] lodash.zip gets confused for a zip archive #2975

hlolli opened this issue Jun 2, 2021 · 5 comments · Fixed by #3042
Labels
bug Something isn't working upholded Real issues without formal reproduction

Comments

@hlolli
Copy link

hlolli commented Jun 2, 2021

Problem:

on latest master with lodash.zip in the dep-tree

➤ YN0001: │ Error: While persisting /.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-41fd8dc1af.zip/node_modules/lodash.zip/ -> /node_modules/lodash.zip ENOTDIR: not a directory, scandir '/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-41fd8dc1af.zip/node_modules/lodash.zip'
➤ YN0000: └ Completed in 1m 11s
➤ YN0000: Failed with errors in 1m 14s

Perhaps this check needs refinement?

// The path either has to end in ".zip" or contain an archive subpath (".zip/...")
if (path.length > nextCharIdx && path[nextCharIdx] !== ppath.sep)

extra info

> file .yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-41fd8dc1af.zip/node_modules/lodash.zip
.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-41fd8dc1af.zip/node_modules/lodash.zip: cannot open `.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-41fd8dc1af.zip/node_modules/lodash.zip' (Not a directory)

> file .yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-41fd8dc1af.zip
.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-41fd8dc1af.zip: Zip archive data, at least v2.0 to extract

 > file /node_modules/lodash.zip  
/node_modules/lodash.zip: cannot open `/node_modules/lodash.zip' (No such file or directory)

> file node_modules/lodash.zip/
node_modules/lodash.zip/: directory

> tree node_modules/lodash.zip/ 
node_modules/lodash.zip/

0 directories, 0 files
@merceyz merceyz added the bug Something isn't working label Jun 2, 2021
@merceyz merceyz changed the title [Compatibility] lodash.zip gets confised for a zip archive [Bug] lodash.zip gets confised for a zip archive Jun 2, 2021
@merceyz merceyz changed the title [Bug] lodash.zip gets confised for a zip archive [Bug] lodash.zip gets confused for a zip archive Jun 2, 2021
@GiladShoham
Copy link
Contributor

This happen to us as well, and it's very critical for us.
We can't go back to the previous rc as then we got something like

Cannot find module '@yarnpkg/cli'
Require stack:
- my-app\node_modules\@yarnpkg\plugin-pack\lib\commands\pack.js
- my-app\node_modules\@yarnpkg\plugin-pack\lib\index.js
- my-app\node_modules\@teambit\yarn\node_modules\@yarnpkg\cli\node_modules\@yarnpkg\plugin-npm\lib\npmPublishUtils.js
- my-app\node_modules\@teambit\yarn\node_modules\@yarnpkg\cli\node_modules\@yarnpkg\plugin-npm\lib\index.js
- my-app\node_modules\@teambit\yarn\node_modules\@yarnpkg\cli\lib\tools\getPluginConfiguration.js
- my-app\node_modules\@teambit\yarn\node_modules\@yarnpkg\cli\lib\index.js
- my-app\node_modules\@teambit\yarn\dist\yarn.package-manager.js
- my-app\node_modules\@teambit\yarn\dist\yarn.main.runtime.js
- my-app\node_modules\@teambit\bit\dist\load-bit.js
- my-app\node_modules\@teambit\bit\dist\app.js
- my-app\node_modules\@teambit\bit\bin\bit

@ratson
Copy link
Contributor

ratson commented Jun 8, 2021

This can be reproduced by

$ yarn --version
3.0.0-rc.5.git.20210607.hash-017bb2f

$ yarn dlx npm-name-cli@3

@yarnbot
Copy link
Collaborator

yarnbot commented Jul 8, 2021

Hi! 👋

This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).

Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃

If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟

@yarnbot yarnbot added the stale Issues that didn't get attention label Jul 8, 2021
@merceyz merceyz added upholded Real issues without formal reproduction and removed stale Issues that didn't get attention labels Jul 8, 2021
@GiladShoham
Copy link
Contributor

This is still not working with the latest version

@merceyz
Copy link
Member

merceyz commented Aug 2, 2021

@GiladShoham Open a new issue with a reproduction please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upholded Real issues without formal reproduction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants