-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Fail to patch lock while when a dependency is depending on a different version of Next.js #65182
Comments
I have the same issue, after update i have this line in my webpack-config.js:
react 19.0.0 is not released yet and in Beta. |
Running into the same issue after updating to React 19 / Next 15. When starting a dev server, I see: ▲ Next.js 15.0.0-rc.0
- Local: http://localhost:8020
- Environments: .env.local
- Experiments (use with caution):
· scrollRestoration
✓ Starting...
⚠ Found lockfile missing swc dependencies, patching...
⨯ Failed to patch lockfile, please try uninstalling and reinstalling next in this workspace
TypeError: Cannot read properties of undefined (reading 'os')
at fetchPkgInfo (/Users/joshu/work/blog-v3/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]_kxxc2t6qs3v2xlyoy2gzfdrn64/node_modules/next/dist/lib/patch-incorrect-lockfile.js:73:25)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async patchIncorrectLockfile (/Users/joshu/work/blog-v3/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]_kxxc2t6qs3v2xlyoy2gzfdrn64/node_modules/next/dist/lib/patch-incorrect-lockfile.js:162:26)
✓ Ready in 3s Uninstalling and reinstalling Next had no effect. Fortunately, however, things still seem to work. Here's the rest of the debug info: Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000
Available memory (MB): 65536
Available CPU cores: 10
Binaries:
Node: 20.11.1
npm: 10.2.4
Yarn: N/A
pnpm: 9.1.4
Relevant Packages:
next: 15.0.0-rc.0 // Latest available version is detected (15.0.0-rc.0).
eslint-config-next: 14.1.0
react: 19.0.0-rc-f994737d14-20240522
react-dom: 19.0.0-rc-f994737d14-20240522
typescript: 5.4.5
Next.js Config:
output: N/A |
@joshwcomeau This will be fixed by #66515 |
Just checking the dashboard repo, while running pnpm -dev, it compiles fine but got the same locfile missing warning now with the rc.56 node: v20.16.0 |
Works for me now as of August 12, 2024 after updating the following dependencies:
Mind the React and React DOM versions. They need to be updated as you update |
thanks @ikushlianski these versions fixed the issue for me |
@ikushlianski great! |
vercel might want to update their getting-started courseware as I ran in to this issue when working through the tutorial. This will scare noobs. 😆 Next.js tutorial link here |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/mwskwong/next-patch-lockfile-fail
To Reproduce
Run
next dev
ornext build
and observe the terminal output.Current vs. Expected behavior
Current
Dependencies are as follow:
Next.js is trying to patch the lock file for the Next.js v14.1.0. It failed to do so, and threw the following error:
Expected
Such error should not be thrown
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 8 Binaries: Node: 20.10.0 npm: 10.2.3 Yarn: 1.22.19 pnpm: 8.15.4 Relevant Packages: next: 14.3.0-canary.31 // Latest available version is detected (14.3.0-canary.31). eslint-config-next: 14.3.0-canary.31 react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
create-next-app
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
So far, this doesn't seem to impact the main application, including
next dev
andnext build
.There isn't seem to have any issues on starting the React Email dev server, which is based on Next.js either.
The text was updated successfully, but these errors were encountered: