ran
pkg app.js -t node10-linux-x64 --output boxit
./boxit
Using "webpackDevMiddleware" config function defined in next.config.js.
Using external babel configuration
Location: "/home/shintaro/Desktop/projects/github/frontend/app/.babelrc"
Failed to compile.
/snapshot/frontend/node_modules/next/dist/client/event-source-polyfill.js
Module not found: Can't resolve '@babel/runtime-corejs2/core-js/json/stringify' in '/snapshot/frontend/node_modules/next/dist/client'
I already removed the babelrc, its not required i think..
I'm using this boilerplate
https://github.com/MustansirZia/next-express-bootstrap-boilerplate
thanks in advance
I have installed this
"@babel/runtime": "^7.3.4",
"@babel/runtime-corejs2": "^7.4.5",
but now fires this error
./app-linux
[ error ] /snapshot/frontend/node_modules/next-server/dist/lib/loadable.js
Module not found: Can't resolve '@babel/runtime-corejs2/core-js/array/is-array' in '/snapshot/frontend/node_modules/next-server/dist/lib'
can someone help
thanks
i found the same error in my project when i use an npm-link module.
but the module work fine if the module is published and install by the project.
so it's there any solutions?...
the error occur when the module have code like this:
Array.isArray();
Solved the issue for me:
npm install --save-dev @babel/runtime-corejs2
I am seeing a similar issue. Unfortunately the solution @benpetsch mentioned does not work. It did change the error slightly and now I am seeing this
web Failed to compile.
/usr/local/lib/node_modules/expo-cli/node_modules/react-error-overlay/lib/index.js
Module not found: Can't resolve '@babel/runtime-corejs2/core-js/array/from' in '/usr/local/lib/node_modules/expo-cli/node_modules/react-error-overlay/lib'
I am using expo with nextjs for web
note: @babel/runtime-corejs2/core-js/array/from exists in node_modules
Same issue here, however after npm install --save-dev @babel/runtime-corejs2 and successfully starting next dev, I just realized that there the server was not reloading anymore and time to time was getting stuck.
yarn @babel/runtime-corejs2 --dev
@benpetsch's fix worked for me
Most helpful comment
Solved the issue for me:
npm install --save-dev @babel/runtime-corejs2