Open devskar opened 7 months ago
looks like a duplicate of https://github.com/yarnpkg/berry/issues/2701 - Cannot run script without installing dependencies even if the script is trying to install
The COPY . .
probably overwrote some install artifacts. Other than that, we would need a reproduction to tell.
yarn 4 doesnt create any node module folder , did you manage to fix this ?
Self-service
Describe the bug
I migrated my yarn v1 setup today to v4. Basically everything went really smooth, but I got a bit of trouble with my Dockerfile. When using yarn v1 I just did
yarn start:prod
and everything went smooth, but now I get the error:This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
. I don’t quite understand why the lockfile would be required to just run a script, but when I added the lockfile and the .yarn folder to the final stage of the Dockerfiile I got the error:Usage Error: The project in /usr/src/app/package.json doesn't seem to have been installed - running an install there might help
.So my question now is: is this intended?. If not, how can I solve it?
And maybe some general feedback for the Dockerfile would be appreciated. I had a hard time finding good resources about setting it up in an efficient way.
To reproduce
Environment
Additional context
No response