Open matt-pawley opened 1 week ago
I realised the actual problem was above this:
Syntax error: "next/font" requires SWC although Babel is being used due to a custom babel config being present.
Simply removing next/font
references resolves the issue.
However, the debugging experience can be improved, therefore I have opened #67003.
Link to the code that reproduces this issue
https://github.com/matt-pawley/nextjs-babel-issue
To Reproduce
npx create-next-app@latest
.babelrc
file (following format detailed here - https://nextjs.org/docs/pages/building-your-application/configuring/babel)npm run dev
Current vs. Expected behavior
Startup fails with the following error:
Provide environment information
Which area(s) are affected? (Select all that apply)
Developer Experience
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
New to Next.js... It could be a user error, but would suggest the docs or error message could be clearer if that is the case.