Closed jianliao closed 1 year ago
I'm also wondering if somebody knows how to fix this with Next 12.x, using patch-package or whatever.
I'm also wondering if somebody knows how to fix this with Next 12.x, using patch-package or whatever.
I was about to ask the same thing
Maybe someone from the @vercel team can patch next@12 to fix it issue
for next@12, a quick temporary fix is to pin the version in package.json
"resolutions": {
"@internationalized/date": "~3.0.1"
}
When trying to deploy Docker on Ubuntu 22.04 I get the following:
Next version:
13.4.1
#20 36.34 Module not found: Can't resolve './projects/Card' #20 36.34 #20 36.34 https://nextjs.org/docs/messages/module-not-found #20 36.34 #20 36.34 ./src/app/projects/project/[slug]/Intro.tsx #20 36.34 Module not found: Can't resolve '@/projects/Tags' #20 36.34 #20 36.34 https://nextjs.org/docs/messages/module-not-found #20 36.34 #20 36.34 ./src/app/about/page.tsx #20 36.34 Module not found: Can't resolve './Intro' #20 36.34 #20 36.34 https://nextjs.org/docs/messages/module-not-found #20 36.34 #20 36.34 ./src/app/about/page.tsx #20 36.34 Module not found: Can't resolve './Technologies'
But on my Macbook M1 using Docker the errors don't happen
Same here, except for tsconfig paths. Help would be appreaciated:
Running build insinde alpine-18 container will yield:
Failed to compile.
./src/app/[locale]/logout/page.tsx Module not found: Can't resolve '@/modules/common/hooks/useAuth'
Is there a repro, if it still occurs?
There is a number of off-topic questions in this issue thread.
This issue topic is about @swc/helpers
, while the other issues simply contain the keyword Can't resolve xxx
. These are not the same issue.
If anyone has the problem with Can't resolve xxx
, it's better to create a new issue thread.
@kdy1 here's a repro: https://github.com/devongovett/next-swc-helpers-repro. It specifically occurs in Next 12 I think because Next's webpack config overrides the resolution to point to @swc/helpers@0.4
? I'm not sure a new @swc/helpers@0.5
would help, because Next 12 has it pinned to 0.4.
It's now fixed 😄
You must update @swc/helpers
of next
package. If you are using yarn
, you can do like
"resolutions": {
"next/@swc/helpers": "0.4.36"
}
Thank you @devongovett and @magic-akari
npm overrides: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides
"overrides": {
"next": {
"@swc/helpers": "0.4.36"
}
}
yarn resolutions: https://yarnpkg.com/configuration/manifest#resolutions
"resolutions": {
"next/@swc/helpers": "0.4.36"
},
pnpm.overrides https://pnpm.io/package_json#pnpmoverrides
"pnpm": {
"overrides": {
"@swc/helpers@~0.4": "0.4.36"
}
}
Thanks so much @kdy1 @magic-akari!
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.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://github.com/jianliao/nextjs-rsp-bug
To Reproduce
The issue is exactly same as #38192.
Describe the Bug
After upgrade to
next@13.3.1-canary.16
, next build will fail with below error messages:Expected Behavior
Build success.
Which browser are you using? (if relevant)
Chrome 113.0.5672.35
How are you deploying your application? (if relevant)
next build