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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Nuxt 2.X build failing due to 'Cannot read properties of null (reading 'scope')' error in @babel/traverse #15299

Closed
1 task
apoorv1410 opened this issue Dec 22, 2022 · 10 comments 路 Fixed by #15305
Labels
i: bug i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: traverse

Comments

@apoorv1410
Copy link

馃捇

  • Would you like to work on a fix?

How are you using Babel?

babel-loader (webpack)

Input code

Can't add the code here. Error occurs with npm run build command

Configuration file name

No response

Configuration

No response

Current and expected behavior

Current error screenshots:
Screenshot from 2022-12-22 18-11-50
Screenshot from 2022-12-22 18-11-39

Environment

  • Babel [v 7.20.7]
  • Nuxt [v 2.15.8]

Possible solution

No response

Additional context

The build is filing with Cannot read properties of null (reading 'scope') in @babel/traverse package version 7.20.7

@babel-bot
Copy link
Collaborator

Hey @apoorv1410! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

@babel-bot
Copy link
Collaborator

Hi @apoorv1410! This issue is missing some important information we'll need to be able to reproduce this issue.

Please understand that we receive a high volume of issues, and there are only a limited number of volunteers that help maintain this project. The easier it is for us to decipher an issue with the info provided, the more likely it is that we'll be able to help.

Please make sure you have the following information documented in this ticket:

  1. Your Babel configuration (typically from .babelrc or babel.config.js)
  2. The current (incorrect) behavior you're seeing
  3. The behavior you expect
  4. A short, self-contained example

Please provide either a link to the problem via the repl, or if the repl is insufficient, a new and minimal repository with instructions on how to build/replicate the issue.

@apoorv1410
Copy link
Author

Fixed with updating node version from 16.13.1 to 16.14.2. Closing the issue now

@liuxingbaoyu
Copy link
Member

It's weird and weirdly solved by upgrading nodejs, but glad it's working now.
If anyone else encounters this problem please reopen a reproducible issue.

@apoorv1410
Copy link
Author

Update: just updating the nodejs version was not enough. We also had to downgrade to 7.20.5 explicitly from package.json with this code:


    "overrides": {
        "@babel/core": {
           ".": "7.20.5",
            "@babel/traverse":"7.20.5"
        }
    }

@liuxingbaoyu liuxingbaoyu reopened this Dec 23, 2022
@xdlrt
Copy link

xdlrt commented Dec 23, 2022

same issue at @babel/traverse, is there any progress?

@liuxingbaoyu
Copy link
Member

Can anyone provide a repo that reproduces it?

retyui added a commit to retyui/babel-issues-15299 that referenced this issue Dec 23, 2022
@retyui
Copy link

retyui commented Dec 23, 2022

@liuxingbaoyu sure:

@liuxingbaoyu
Copy link
Member

liuxingbaoyu commented Dec 23, 2022

v7.20.10 is released, hoping to fix this issue.
https://www.npmjs.com/package/@babel/traverse

@necatisarhanli
Copy link

@liuxingbaoyu fix is legit , thanks everyone :)

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: traverse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants