Open vip30 opened 8 months ago
@vip30 I had the same issue today and my fix was to explicitly add @babel/runtime
as a dependency.
This was not needed before Next.js 14.0.4, so it needs some investigating as to why this is now needed.
Edit: It seems this has started on v13.5.7-canary.9, last working version was v13.5.6 - https://github.com/vercel/next.js/compare/v13.5.6...v13.5.7-canary.9
I handled this issue by deleting babel.config.js (= compiling SWC). But I still don't know how handle this with babel.
I have tried @jpedroribeiro solution is working as expected and we need to use some of the babel plugin which swc is not supported so we can't use SWC for compiling
Link to the code that reproduces this issue
https://github.com/vip30/nextjs14-reproduce
To Reproduce
yarn build
Error: Failed to resolve "@babel/runtime/regenerator" relative to
Current vs. Expected behavior
I tried nextjs 13, it's work
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
No response