-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[turborepo] error installing depencies from pruned lock file #2691
Comments
I'm running into the npm equivalent of this over in npm land. COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/package-lock.json ./package-lock.json
RUN --mount=type=cache,target=/root/.npm \
--mount=type=secret,id=npmrc,target=/root/.npmrc \
npm ci --no-audit --no-fund --prefer-offline which results in #18 [builder 8/12] RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm ci --no-audit --no-fund --prefer-offline
#18 sha256:55bf88e06459432be0618ed1ad56c8f11a7c3c95727718aa617f3026dac17123
#18 6.535 npm notice
#18 6.535 npm notice New major version of npm available! 8.19.2 -> 9.1.1
#18 6.535 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.1.1>
#18 6.535 npm notice Run `npm install -g npm@9.1.1` to update!
#18 6.535 npm notice
#18 6.556 npm ERR! code EUSAGE
#18 6.584 npm ERR!
#18 6.584 npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
#18 6.584 npm ERR!
#18 6.584 npm ERR! Missing: amqplib@0.10.3 from lock file
#18 6.584 npm ERR! Missing: avsc@5.7.7 from lock file
#18 6.584 npm ERR! Missing: bunyan@1.8.15 from lock file
... The list of missing dependencies keeps going for 245 (all?) of my dependencies. I'm using |
I did some more digging and EDIT: This is inaccurate. I compared the wrong samples. Comparing the correct samples reveals some differences. The vast majority of things are inconsequential-to-installation stripping of package metadata like Spot-checking items from the list For reference, the lockfile samples I'm comparing are the |
Okay some folks I work with took a look with me and it does appear that the npm issue, while likely still related, isn't the same issue as the yarn issue. I've opened #2739 to track the npm issue. @JamesAlexanderHill I tried to reproduce the yarn issue here: https://github.com/keawade/turbo-wat/tree/yarn but it appears to either be something else or not as directly translatable to the npm issue I ran into. Feel free to fork that repo/branch if you're looking to create a reproduction repo. |
Hi @JamesAlexanderHill, could you provide a reproduction? If that's not possible, getting at least the original and pruned lockfile would me debug the issue. |
@chris-olszewski I've hit the same issue and it appears to have been triggered by our use of yarn Our repo currently only has a single package which I am pruning to (trying to prepare for soe apps to be added and don't want CI installing all the deps just to publish the lib). in root package.json..
in root yarn.lock
Running When I remove the
|
I expect this to be fixed in the same PR that solves #2791. Closing this in favor of that issue. |
What version of Turborepo are you using?
1.6.3
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Describe the Bug
In my docker file I have the following step:
RUN turbo prune --scope=$APP_NAME --docker
This generates the .out directory with the following structure
I then copy the yarn.lock + json and install dependencies with these steps:
I get the following error:
error Your lockfile needs to be updated, but yarn was run with
--frozen-lockfile.
Looks like prune is not correcctly pruning the yarn.lock
Expected Behavior
Dependencies can be installed with
yarn install --production --frozen-lockfile
without error.yarn.lock should match package.json
To Reproduce
install dependencies from pruned repo with docker flag.
Reproduction Repo
No response
The text was updated successfully, but these errors were encountered: