-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[V2] Error: WebpackError: Cannot find module 'core-js/modules/es6.object.assign' #13213
Comments
Already tried adding ad removing core-js@2 and core-js@latest deleted node_modules, .cache, package-lock.json and yarn.lock |
Sorry about this! Could you provide a reproduction? It will drastically speed up the time we can check things out and find a fix! |
I just had the same error, I needed to remove core-js that I just installed because firebase was missing it and it fixed it. But now I cannot use firebase |
This bug appeared multiple times in the past, see #7862 and #12744. The solution for me was this one. But I shall say, these random issues appear quite frequently and it's scary to think that at any time the CI/CD pipeline can break for obscure reasons and no changes to the code except for a slightly loose versioning scheme. I tend to prefer to avoid strict package versioning in the applications I write, to allow getting fixes and improvements from package authors, but gatsby is not very friendly in that sense. |
Yep, it's helpful for fix dev/build pipeline, but firebase didn't want work with core-js@2 |
No solution work for me with minimal absolute minimal config on hello-world gatsby example (just importing firebase)
give
and
give
|
I should add that reverting to gatsby@2 is not helping, neither firebase@5 |
also having the same issue. i wonder if this issue is caused because of firebase? |
I guess its something like deadlock, gatsby didn't work with core-js@3 firebase didn't work with @2 ) |
@VallyPepyako firebase < 5.9.0 still works with core-js@2.6.5 my current solution regarding this problem is just downgrade firebase to version 5.9.0 |
@adberard
just remove node_modules folder and If after run
I think this problem is because of quite dramatic change between core-js@2 vs core-js@3 the key to fix this bug is in this link i guess https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md the default gatsby @babel/preset-env is still use |
@hendra-go Could you provide a minimal working package.json ? This is mine that doesnt work. (
|
@adberard
should be enough, you don't need core-js as dependencies in your package.json, and as i mentioned above If after run yarn install and still core-js@3 got installed, there must be some other library that you use is depends on core-js@3 ahh.. i just realize why your package.json does not work, because u use |
Okay I managed to make it work !
(it doesnt work either when the ^ is in front tho) |
@adberard if you still want to use the latest firebase you can do this:
as mentioned here and i think it is ok to close this issue because like @simoneb said this issue is possibly duplicate of #7862 and #12744 |
Reproduction link: https://github.com/myTDC/tdc-works/tree/corejs-bug |
While i agree that the issues seems to be duplicate of the issues you've listed, there are still a few things made me file a new issue.
I would be more than happy to have this issue closed once I find a solution that works. |
Yes I actually sticked to firebase 5.9.0 but im unhappy with this solution also I dont know how to handle this use case :
|
I was still getting an error but this fixed it:
No need to install core-js module. |
I got the same issue without firebase and solved with core-js@2.6.5 the 3.0 didn't work. |
Me too. |
I found this page via Google when searching on this same error. In my case, I first encountered the error when trying to spin up a sample project from the Material UI/gatsby repo, and was not able to run WebpackError: Cannot find module 'core-js/modules/es6.object.assign' I found a similar starter kit on gatsbyjs.org that uses Material UI and clicked the "Try this starter" link to automatically spin up a Netlify build. The Netlify deploy fails with the exact same error (on a starter kit unrelated to the repo I am trying to run local.) See screenshot from Netlify deploy log: On local development, it seems I am able to fix this by forcing an install of core-js version 2:
This allows me to run Gatsby version: 2.5.12 |
Still getting the same error with gatsby develop command |
core-js@^2.0.0 isn't resolving it either. |
Hi! Do anyone has a simple repository with the right dependencies for Firebase and Gatsby and implementing them? I am sorry reopening this conversation but I could not solve this issue (I read all of your solutions) and I have tried everything. |
@mikenieva Well not super simple, but here is an example of how we are using firebase auth with a React sign in component. |
Hi, as firebase/firebase-js-sdk#1668 (comment) // import * as firebase from `firebase/app`; replace this line with the line below.
import * as firebase from '@firebase/app'; the folder structure looks like:
|
Description
Following Error encountered upon running
gatsby develop
in the terminalerror 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'
gatsby-browser-entry.js:1 Function.Module._load
lib/.cache/gatsby-browser-entry.js:1:1
universalModuleDefinition:3 webpackUniversalModuleDefinition
lib/webpack/universalModuleDefinition:3:1
universalModuleDefinition:10 Object.
lib/webpack/universalModuleDefinition:10:2
extends.js:2 Object.Module._extensions..js
[lib]/[@babel]/runtime/helpers/esm/extends.js:2:1
gatsby-browser-entry.js:1 Function.Module._load
lib/.cache/gatsby-browser-entry.js:1:1
bootstrap:21 Promise
lib/webpack/bootstrap:21:1
develop-static-entry.js:34 Promise._resolveFromExecutor
lib/.cache/develop-static-entry.js:34:7
Steps to reproduce
Upgraded
firebase to: v5.9.3
formik to: v1.5.2
ran
gatsby develop
encountered the error
Exact combination of packages and their versions.
Expected result
What should happen?
The build should've completed successfully and the site should've been served on the localhost
Actual result
What happened.
The build failed with the above mentioned message.
Environment
Run
gatsby info --clipboard
in your project directory and paste the output here.System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Binaries:
Node: 11.13.0 - D:\devlibs\Node\node.EXE
Yarn: 1.15.2 - D:\Dev\Libs\Yarn\bin\yarn.CMD
npm: 6.9.0 - D:\devlibs\Node\npm.CMD
Browsers:
Edge: 44.17763.1.0
npmPackages:
gatsby: ^2.3.15 => 2.3.15
gatsby-image: ^2.0.37 => 2.0.37
gatsby-plugin-manifest: ^2.0.27 => 2.0.27
gatsby-plugin-offline: ^2.0.25 => 2.0.25
gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
gatsby-plugin-sharp: ^2.0.32 => 2.0.32
gatsby-source-filesystem: ^2.0.29 => 2.0.29
gatsby-transformer-sharp: ^2.1.17 => 2.1.17
error UNHANDLED REJECTION
Error: The system cannot find the path specified.
envinfo.js:1 Function.e.exports.sync
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:4908
envinfo.js:1 Object.copySync
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:66886
envinfo.js:1 Object.t.writeSync.e [as writeSync]
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:48715
envinfo.js:1
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:46872
envinfo.js:1 Promise.all.then.e
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:46887
task_queues.js:86 processTicksAndRejections
internal/process/task_queues.js:86:5
The text was updated successfully, but these errors were encountered: