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

TypeError: Cannot read property 'buildError' of undefined #11826

Closed
antoinerousseau opened this issue Feb 16, 2019 · 3 comments
Closed

TypeError: Cannot read property 'buildError' of undefined #11826

antoinerousseau opened this issue Feb 16, 2019 · 3 comments
Labels
help wanted Issue with a clear description that the community can help with. stale? Issue that may be closed soon due to the original author not responding any more. type: upstream Issues outside of Gatsby's control, caused by dependencies

Comments

@antoinerousseau
Copy link
Contributor

antoinerousseau commented Feb 16, 2019

Description

JS errors in gatsby-node.js#onPostBuild (and maybe in other places too) are obscure.

Steps to reproduce

  • run gatsby new gatsby-test
  • add this to gatsby-node.js:
exports.onPostBuild = async () => {
    const arr = []
    const arr = []
}
  • run gatsby build

Expected result

SyntaxError: Identifier 'arr' has already been declared

Actual result

TypeError: Cannot read property 'buildError' of undefined

Environment

  System:
    OS: macOS 10.14.3
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 11.6.0 - /usr/local/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.8.0 - /usr/local/bin/npm
  Languages:
    Python: 2.7.15 - /usr/local/bin/python
  Browsers:
    Chrome: 72.0.3626.109
    Firefox: 65.0.1
    Safari: 12.0.3
  npmPackages:
    gatsby: ^2.1.4 => 2.1.4
    gatsby-image: ^2.0.29 => 2.0.29
    gatsby-plugin-manifest: ^2.0.17 => 2.0.17
    gatsby-plugin-offline: ^2.0.23 => 2.0.23
    gatsby-plugin-react-helmet: ^3.0.6 => 3.0.6
    gatsby-plugin-sharp: ^2.0.20 => 2.0.20
    gatsby-source-filesystem: ^2.0.20 => 2.0.20
    gatsby-transformer-sharp: ^2.1.13 => 2.1.13
  npmGlobalPackages:
    gatsby-cli: 2.4.10
@wardpeet wardpeet added help wanted Issue with a clear description that the community can help with. type: upstream Issues outside of Gatsby's control, caused by dependencies labels Feb 18, 2019
@wardpeet
Copy link
Contributor

wardpeet commented Feb 18, 2019

You're completely right. Sadly it's an upstream bug on babel's side #8617. I've just subscribed to it and I'll try to help pinpoint the issue there.

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 11, 2019
@gatsbot
Copy link

gatsbot bot commented Mar 11, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot
Copy link

gatsbot bot commented Mar 22, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

Thanks again for being part of the Gatsby community!

@gatsbot gatsbot bot closed this as completed Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. stale? Issue that may be closed soon due to the original author not responding any more. type: upstream Issues outside of Gatsby's control, caused by dependencies
Projects
None yet
Development

No branches or pull requests

2 participants