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]This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions #2146

Closed
LvChengbin opened this issue Nov 19, 2020 · 11 comments
Labels
bug Something isn't working stale Issues that didn't get attention waiting for feedback Will autoclose in a while unless more data are provided

Comments

@LvChengbin
Copy link

LvChengbin commented Nov 19, 2020

This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions

I got this error message after upgrading yarn to version 2.3.3 and removing the yarn.lock file.
It seems that yarn didn't generate a new lockfile after running yarn command.

I tried to debug with berry sources, but this issue isn't reproducible with 2.3.3-git.20201118.af1c837d.

@LvChengbin LvChengbin added the bug Something isn't working label Nov 19, 2020
@merceyz
Copy link
Member

merceyz commented Nov 19, 2020

Please follow the issue template, there isn't much we can do based on this limited amount of information.

I tried to debug with berry sources, but this issue isn't reproducible with

So what you're saying is that it got fixed already?

@merceyz merceyz added the waiting for feedback Will autoclose in a while unless more data are provided label Nov 19, 2020
@SmileyJames
Copy link

I am also experiencing this issue. I am attempting to migrate a yarn 1 project to yarn 2, following this guide: https://yarnpkg.com/getting-started/migration

yarn install doesn't generate a yarn.lock as promised

I am experiencing a minor error when executing yarn install, but the command as a whole exits with code 0

Then attempting to execute a yarn run commnd generates: "Internal Error: root@workspace:.: This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions"

@merceyz
Copy link
Member

merceyz commented Dec 7, 2020

I am experiencing a minor error when executing yarn install, but the command as a whole exits with code 0

Could you share said error?

@SmileyJames
Copy link

➤ YN0001: │ HTTPError: @my-scope/my-component@npm:^0.0.108: Response code 404 (Not Found)
    at se.<anonymous> (/Users/me/Code/my-project/.yarn/releases/yarn-berry.cjs:23:10082)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
➤ YN0000: └ Completed in 2s 242ms
➤ YN0000: Failed with errors in 2s 248ms

@merceyz
Copy link
Member

merceyz commented Dec 7, 2020

That means the install failed and thus there is no lockfile, you need to setup the auth so Yarn can download the dependency.
https://yarnpkg.com/configuration/yarnrc#npmScopes.npmAuthToken or https://yarnpkg.com/configuration/yarnrc#npmAuthToken

This is mentioned as step 4 in the migration guide https://yarnpkg.com/getting-started/migration#step-by-step

@SmileyJames
Copy link

@merceyz Firstly, thanks for your help. The registry we are using is certificate protected. My old .yarnrc has registry, caFilePath, cert and key config
I can see new config options for registry and caFilePath, but cert and key do not seem to be available in the new yml format.

Does yarn 2 support certificate protected registries at this time?

@merceyz
Copy link
Member

merceyz commented Dec 9, 2020

No, not at the moment. A PR adding support for those would be welcome

@SmileyJames
Copy link

Thank you for all your help! From my perspective this issue can be closed, although OP may disagree.

@yarnbot
Copy link
Collaborator

yarnbot commented Jan 9, 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 Jan 9, 2021
@merceyz merceyz closed this as completed Jan 9, 2021
@SmileyJames
Copy link

Thank you for closing

We managed to resolve this issue by migrating our infrastructure from mTLS to OAuth provided by GitHub.

Soon we will be using Yarn 2

@evertoncruz
Copy link

I am also experiencing this issue. I am attempting to migrate a yarn 1 project to yarn 2, following this guide: https://yarnpkg.com/getting-started/migration

yarn install doesn't generate a yarn.lock as promised

I am experiencing a minor error when executing yarn install, but the command as a whole exits with code 0

Then attempting to execute a yarn run commnd generates: "Internal Error: root@workspace:.: This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions"

Thank you !!! Work for me!!!

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 waiting for feedback Will autoclose in a while unless more data are provided
Projects
None yet
Development

No branches or pull requests

5 participants