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

pnpm import fails with yarn v2 #3993

Closed
hmnd opened this issue Nov 15, 2021 · 1 comment · Fixed by #3997
Closed

pnpm import fails with yarn v2 #3993

hmnd opened this issue Nov 15, 2021 · 1 comment · Fixed by #3997
Assignees
Milestone

Comments

@hmnd
Copy link

hmnd commented Nov 15, 2021

pnpm version:

v6.22.1

Code to reproduce the issue:

Run command pnpm import in a yarn v2 project.

.pnpm-debug.log

Expected behavior:

pnpm imports the yarn v2 lockfile successfully.

Actual behavior:

import fails due to new v2 lockfile format.

Additional information:

  • node -v prints: v16.13.0
  • Windows, macOS, or Linux?: Linux (Ubuntu under WSL2)

Currently, @yarnpkg/lockfile is being used to parse yarn lockfiles. @yarnpkg/lockfile has not been updated in 4 years, so it hasn't been updated to support the latest lockfile format.

A possible solution would be to switch to snyk-nodejs-lockfile-parser. That package appears to be actively maintained and supports both old and new yarn lockfile formats.

@fireairforce
Copy link
Member

I will import a yarn2lockParser into it by the snyk-nodejs-lockfile-parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants