I am using gatsby via docz. After the latest release, the static build has started failing. It works fine when I pin the package to the immediately previous version. Since it was a patch release, there shouldn't be any breaking changes in the release.
> gatsby build "--prefix-paths"
.....
.....
success write out requires - 0.006s
warn Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
failed Building production JavaScript and CSS bundles - 15.921s
ERROR #98124 WEBPACK
Generating JavaScript bundles failed
Can't resolve 'core-js/modules/es.array-buffer.constructor' in '/Users/mohsin.ulhaq/Documents/react-popper-tooltip/node_modules/buffer'
If you're trying to use a package make sure that 'core-js/modules/es.array-buffer.constructor' is installed. If you're trying to use a local file make sure that the path is correct.
File: ../node_modules/buffer/index.js
ERROR #98124 WEBPACK
Generating JavaScript bundles failed
Can't resolve 'core-js/modules/es.array.concat' in '/Users/mohsin.ulhaq/Documents/react-popper-tooltip/node_modules/buffer'
If you're trying to use a package make sure that 'core-js/modules/es.array.concat' is installed. If you're trying to use a local file make sure that the path is correct.
File: ../node_modules/buffer/index.js
.....
.....
.....
System:
OS: macOS 10.15.5
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.2 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 83.0.4103.116
Firefox: 77.0.1
Safari: 13.1.1
I can confirm. Same core-js error since updating to the latest version.
Hi!
Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.
Thanks for using Gatsby! 馃挏
@Mohsin Ul Haq @t2ca
I cloned https://github.com/mohsinulhaq/react-popper-tooltip, weird that I didn't saw these issues earlier. I'm on it!
I wonder whether the fact that gatsby-cli is still using js-core@2 is a problem here?
I wonder whether the fact that
gatsby-cliis still using js-core@2 is a problem here?
Actually, I had a build error yesterday linked to yoga-layout-prebuilt, which is used by gatsby-cli through ink according to my package-lock. Also raising an core-js error.
2:35:44 PM: /opt/build/repo/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
2:35:44 PM: throw ex;
2:35:44 PM: ^
2:35:44 PM: Error: Cannot find module 'core-js/fn/map'
2:35:44 PM: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:613:15)
We have reverted our core-js changes yesterday, could you see if it works for you with latest Gatsby?
@freiksenet yes, it works with the latest release 2.23.19, thanks a lot!
closing this issue.
Most helpful comment
@Mohsin Ul Haq @t2ca
I cloned https://github.com/mohsinulhaq/react-popper-tooltip, weird that I didn't saw these issues earlier. I'm on it!