Berry: [Bug] Not running simple yarn install

Created on 10 Dec 2019  路  7Comments  路  Source: yarnpkg/berry

  • [ ] I'd be willing to implement a fix

Describe the bug

A clear and concise description of what the bug is.
I've tried to run yarn install here (https://github.com/sibelius/yarn-workspaces-slow) and got the following error:

I did this

yarn policies set-version v2
````

yarn install

Usage Error: The project in /app/package.json doesn't seem to have been installed - running an install there might help
```

the repo was like this:

/app/yarn-workspaces-slow

To Reproduce

The _minimal_ information needed to reproduce your issue (ideally a package.json with a single dep). Note that bugs without minimal reproductions might be closed.

IMPORTANT: We strongly prefer reproductions that use Sherlock. Please check our documentation for more information: https://next.yarnpkg.com/advanced/sherlock

run yarn berry here https://github.com/sibelius/yarn-workspaces-slow

Screenshots

If applicable, add screenshots to help explain your problem.

Environment if relevant (please complete the following information):

  • OS: [e.g. OSX, Linux, Windows, ...] mac
  • Node version [e.g. 8.15.0, 10.15.1, ...] 12.13.0
  • Yarn version [e.g. 2.0.0-rc1, ...] 2.0.0-rc.19

Additional context

Add any other context about the problem here.

bug

All 7 comments

Do you by any chance have a yarn.lock in /app? The error message doesn't reference the cloned project, which leads me to believe that Yarn thinks /app is the root of your app. This should only happen if you have a lockfile in an ancestor folder.

FWIW, I could reproduce. I had unused yarn.lock files in two ancestor files. Deleting them fixed it for me.

~/yarn.lock
~/Projects/yarn.lock

I can confirm that this is the case

but should this work? as it worked with yarn, but no work with berry?

I've deleted all package.json and yarn.lock from other packages

but I got this error

Usage Error: The project in /Users/sibelius/package.json doesn't seem to have been installed - running an install there might help

/Users/sibelius/ is my home dir ~

the problem now is that there are no package.json there to be excluded

the problem now is that there are no package.json there to be excluded

Sorry if I'm making you repeat yourself but did you also remove a yarn.lock from the home dir? /Users/sibelius/yarn.lock

Yarn 2 supports nested workspaces which may relate to the change in behaviour. arcanis would know more.

got working here

there are a yarn.lock there on home dir as well

Thanks for creating an issue @sibelius. I added a feature request based on your feedback.

Let us know if you hit any other blockers with yarn 2. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thealjey picture thealjey  路  4Comments

Bessonov picture Bessonov  路  4Comments

mormahr picture mormahr  路  3Comments

tiansijie picture tiansijie  路  4Comments

chrisands picture chrisands  路  3Comments