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
Turbo installation via npm ci
fails on Windows with package-lock.json
created on another platform
#1749
Comments
I had the same issue on circleci which was using Linux platform. |
It works for me |
* upgrade angular/core to v14.2.0 * upgrade angular/material to v14.2.0 * upgrade angular-architects/module-federation to v14.3.10 * upgrade ngrx/store to v14.3.0 * uninstall @nguniversal/module-map-ngfactory-loader * upgrade ngx-build-plus to v14.0 * upgrade ng-packagr and @schematics/angular * improve zoneJs version * update package lock json * patch app version * temporary fix for vercel/turbo#1749 * trying again: temporary fix for vercel/turbo#1749
I believe this is happening for mac with linux as well but on Github Actions i get the infamous not the first time either, had been working fine recently until the lock was touched Been experiencing this issue for months now. It'll creep up every now and then. Though the fix in github actions is to change the version of turborepo, which isn't a solution. just a mickey-mouse fix. EDIT: for me apparently at some point or another inside package-lock.json, npm was removing critical fields. Why? I'm not entirely sure. But that seems to be the culprit on my end at least, in my case it was Linux: #1263 (comment) |
One thing I noticed is that after doing the following to recreate my rm package-lock.json
npm install After running |
@soulchild What version of node/npm are you using? I've been trying to repro this on my machine since it sounds like a promising lead, but I haven't gotten the behavior you're describing. |
@chris-olszewski I'm on node v16.17.1 and npm v8.15.0. Thanks for investigating! |
I was able to mitigate the problem on Github Actions with the following: - run: npm install
+ run: npm install --no-save turbo-linux-64 && npm install node |
For what it's worth, I saw a similar error to this using |
Hi everyone, sharing some discoveries. It seems this is a pretty well reported issue with npm (npm/cli#4828) with a PR that should fix it. Not a solution, but the bug report does provide a work around:
I think you might've hit pnpm/pnpm#4961 which would've been fixed by upgrading to |
I have observed the same with My lock file is generated on linux, and the CI/CD agent is running Windows. I can confirm that the |
Note that you can add multiple architectures to the package-lock.json:
This should allow |
There's a good discussion here with good workarounds for upstream issues. I'm going to close and lock this. If you encounter similar issues start by regenerating your lockfile with no node_modules on disk. This is not intended to prevent reporting issues, it's so that, if a new issue is introduced, we can differentiate. If you still have issues, please feel encouraged to open another issue! |
What version of Turborepo are you using?
1.4.3
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Windows
Describe the Bug
This happens when running
npm ci
on a Windows system, on a repo that was originally created on a Mac. My guess is that thepackage-lock.json
hasturbo-darwin-arm64
instead ofturbo-windows-64
(after all that’s an optional dependency) -- but the install script forturbo
expects the platform-specific dependency to be there.Workaround: Our developers were able to work around this by first running
npm i turbo
, before runningnpm ci
.I believe this may also be an issue if we run turbo in our CI since it’s yet another platform (Linux ARM64) that is different from our Mac & Windows dev systems. I have not tried that.
Similar to issue #947.
Expected Behavior
npm ci
should complete without any prerequisitesTo Reproduce
If
turbo-windows-64
is available (globally or in the localnode_modules
) then you don’t see this error. For example, after runningnpm i turbo
, thenpackage-lock.json
will be updated with the platform-specific version of turbo.You need to be in a clean repo that has a
package-lock.json
built on another platform and nonode_modules
, andturbo
not installed globally.The text was updated successfully, but these errors were encountered: