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] YN0001: Error: mamacro@npm:0.0.3: Not a zip archive #769

Closed
Max-Zviagintsev opened this issue Jan 25, 2020 · 4 comments
Closed

[Bug] YN0001: Error: mamacro@npm:0.0.3: Not a zip archive #769

Max-Zviagintsev opened this issue Jan 25, 2020 · 4 comments
Labels
bug Something isn't working stale Issues that didn't get attention

Comments

@Max-Zviagintsev
Copy link

Can't finish yarn install after deleting node modules and yarn.lock.

YN0001: │ Error: mamacro@npm:0.0.3: Not a zip archive
at new I (C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:18:273327)
at C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:36:569584
at async C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:36:569392
at async C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:36:570734
at async s.lockPromise (C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:18:31207)
at async C.writeFileWithLock (C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:36:570699)
at async C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:36:569343
at async C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:36:570734
at async s.lockPromise (C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:18:31207)
at async C.writeFileWithLock (C:\Users\maxim\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:36:570699)

@Max-Zviagintsev Max-Zviagintsev added the bug Something isn't working label Jan 25, 2020
@Max-Zviagintsev
Copy link
Author

Same error when trying to create new project using:
npx create-react-app my-app --template typescript

@arcanis
Copy link
Member

arcanis commented Jan 26, 2020

Cannot reproduce - given the error message, it likely indicates that the zip archive is downloaded corrupted somehow. Do you have a proxy by any chance?

Can you also run yarn set version from sources --no-minify? It'll highlight the right place where the exception is thrown, and could allow you to add console.log statements to figure out whether relevant informations are hidden (basically anything you have about the generated file would be useful).

@Max-Zviagintsev
Copy link
Author

Max-Zviagintsev commented Jan 26, 2020

OK, done this:

 yarn set version from sources --no-minify
➤ YN0000: Cloning the remote repository

  $ git init C:\Users\maxim\AppData\Local\Temp\yarnpkg-sources
  $ git remote add origin https://github.com/yarnpkg/berry.git
  $ git fetch origin master
  $ git reset --hard FETCH_HEAD

➤ YN0000: Building a fresh bundle

✓ Done building the CLI!
? Bundle path: C:\Users\maxim\AppData\Local\Temp\yarnpkg-sources\packages\yarnpkg-cli/bundles/yarn.js
? Bundle size: 5.53 MB
    → @yarnpkg/plugin-essentials
    → @yarnpkg/plugin-compat
    → @yarnpkg/plugin-dlx
    → @yarnpkg/plugin-file
    → @yarnpkg/plugin-git
    → @yarnpkg/plugin-github
    → @yarnpkg/plugin-http
    → @yarnpkg/plugin-init
    → @yarnpkg/plugin-link
    → @yarnpkg/plugin-node-modules
    → @yarnpkg/plugin-npm
    → @yarnpkg/plugin-npm-cli
    → @yarnpkg/plugin-pack
    → @yarnpkg/plugin-patch
    → @yarnpkg/plugin-pnp

➤ YN0000: Saving the new release in .yarn/releases/yarn-sources.js
➤ YN0000: Done in 3.37m

And then tried to run yarn install in my yarn 1 project. Got:

➤ YN0001: │ Error: mamacro@npm:0.0.3: Not a zip archive
    at new ZipFS (C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:6820:15)
    at loadPackageThroughMirror (C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:60202:14)
    at async C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:60212:25
    at async C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:60265:14
    at async NodeFS.lockPromise (C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:5511:14)
    at async Cache.writeFileWithLock (C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:60264:12)
    at async C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:60211:16
    at async C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:60265:14
    at async NodeFS.lockPromise (C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:5511:14)
    at async Cache.writeFileWithLock (C:\server\bsg_front_minimal\.yarn\releases\yarn-sources.js:60264:12)
➤ YN0000: └ Completed in 44.17s
➤ YN0000: Failed with errors in 1.05m

No proxy. Yarn 1 runs fine.

@yarnbot
Copy link
Collaborator

yarnbot commented Jun 9, 2020

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 resolution faster). 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Issues that didn't get attention
Projects
None yet
Development

No branches or pull requests

3 participants