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

Error when using npm and running develop scripts #107

Closed
JoschuaSchneider opened this issue May 6, 2019 · 1 comment
Closed

Error when using npm and running develop scripts #107

JoschuaSchneider opened this issue May 6, 2019 · 1 comment

Comments

@JoschuaSchneider
Copy link
Contributor

Bug Report

Current Behavior
Upon running npm run develop, gatsby exits with a Webpack Error:

info bootstrap finished - 2.231 s

error There was an error compiling the html.js component for the development server.

See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html


  WebpackError: Cannot find module 'core-js/modules/es6.object.assign'
  

Reproducible demo
Cleanly clone the repo, npm install dependencies, run npm run develop

Expected behavior/code
Gatsby should start the development server without any errors.

Possible Solution
As pointed out in an issue over at the gatsby repo Error: Cannot find module 'core-js/modules/es6.object.assign', upgrading the gatsby dependency fixes the issue.
Upgrading gatsby also fixed the issue for me.

Additional context/Screenshots

Error screenshot

@JoschuaSchneider JoschuaSchneider changed the title Upgrade gatsby dependency Error when using npm and running develop scripts May 6, 2019
@JoschuaSchneider
Copy link
Contributor Author

JoschuaSchneider commented May 6, 2019

I was using NPM when encountering this problem. For NPM, either upgrading gatsby or installing core-js@2 fixed the issue for me.

For anybody having this problem, using yarn (which should have been obvious seeing the yarn.lock file) fixes the problem.

When running with NPM, there probably is some package missing thats covered by the yarn lockfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant