Skip to content
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

v12.2.6-canary.0 Babel Error: Cannot find module 'babel-plugin-macros' #40236

Closed
1 task done
nbouvrette opened this issue Sep 5, 2022 · 2 comments
Closed
1 task done
Labels
bug Issue was opened via the bug report template.

Comments

@nbouvrette
Copy link
Contributor

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
Binaries:
  Node: 14.18.3
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 12.2.6-canary.9
  eslint-config-next: 12.2.5
  react: 18.2.0
  react-dom: 18.2.0

What browser are you using? (if relevant)

N/A

How are you deploying your application? (if relevant)

N/A

Describe the Bug

As soon as I install v12.2.6-canary.0 and try to npm run dev I get the following error:

info  - Using external babel configuration from \next-multilingual\example\.babelrc
error - ./pages/_app.tsx
Error: [BABEL] \next-multilingual\example\pages\_app.tsx: Cannot find module 'babel-plugin-macros'
Require stack:
- \next-multilingual\node_modules\styled-jsx\dist\babel\index.js
- \next-multilingual\node_modules\styled-jsx\babel.js
- \next-multilingual\node_modules\next\dist\build\babel\preset.js
- \next-multilingual\node_modules\next\babel.js
- \next-multilingual\node_modules\next\dist\compiled\babel\bundle.js
- \next-multilingual\node_modules\next\dist\compiled\babel\traverse.js
- \next-multilingual\node_modules\next\dist\build\babel\loader\transform.js
- \next-multilingual\node_modules\next\dist\build\babel\loader\index.js
- \next-multilingual\node_modules\next\dist\compiled\webpack\bundle5.js
- \next-multilingual\node_modules\next\dist\compiled\webpack\webpack.js
- \next-multilingual\node_modules\next\dist\server\config-utils.js
- \next-multilingual\node_modules\next\dist\server\config.js
- \next-multilingual\node_modules\next\dist\server\next.js
- \next-multilingual\node_modules\next\dist\server\lib\start-server.js
- \next-multilingual\node_modules\next\dist\cli\next-dev.js
- \next-multilingual\node_modules\next\dist\lib\commands.js
- \next-multilingual\node_modules\next\dist\bin\next (While processing: "\\next-multilingual\\node_modules\\next\\babel.js")

This prevents the application from starting and causes Internal Server Error

Expected Behavior

Using 12.2.5 (and previous versions) the application starts normally.

Link to reproduction

https://github.com/Avansai/next-multilingual

To Reproduce

Working Steps

  1. Clone https://github.com/Avansai/next-multilingual
  2. npm install
  3. npm build
  4. cd example
  5. npm install
  6. npm run dev

Failing Steps
Redo the same steps but before steps 1 and 2 run: npm i -D next@12.2.6-canary.0

Workaround
I can make this work by running npm i babel-plugin-macros after step 1 - this was never required before.

Potential root cause
This is the only Babel change I could spot https://github.com/vercel/next.js/pull/39520/files on v12.2.6-canary.0

@nbouvrette nbouvrette added the bug Issue was opened via the bug report template. label Sep 5, 2022
@ijjk
Copy link
Member

ijjk commented Sep 5, 2022

Closing as fixed in #40234, will be available in 12.2.6-canary.10 of Next.js

@ijjk ijjk closed this as completed Sep 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants