Problem:
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: /home/mccrazy/Documents/codes/napp/.nuxt/client.js: Cannot find module '@babel/preset-env/lib/utils'
Require stack:
- /home/mccrazy/Documents/codes/napp/node_modules/@nuxt/babel-preset-app/src/polyfills-plugin.js
- /home/mccrazy/Documents/codes/napp/node_modules/@nuxt/babel-preset-app/src/index.js
- /home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/config/files/module-types.js
- /home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/config/files/configuration.js
- /home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/config/files/index.js
- /home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/index.js
- /home/mccrazy/Documents/codes/napp/node_modules/babel-loader/lib/index.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/node_modules/loader-runner/lib/loadLoader.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/lib/NormalModule.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/lib/NormalModuleFactory.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/lib/Compiler.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/lib/webpack.js
- /home/mccrazy/Documents/codes/napp/node_modules/@nuxt/webpack/dist/webpack.js
- /home/mccrazy/Documents/codes/napp/node_modules/@nuxt/builder/dist/builder.js
- /home/mccrazy/Documents/codes/napp/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at n (/home/mccrazy/Documents/codes/napp/node_modules/jiti/dist/v8cache.js:2:2364)
at PluginPass.Program (/home/mccrazy/Documents/codes/napp/node_modules/@nuxt/babel-preset-app/src/polyfills-plugin.js:15:34)
at newFn (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/visitors.js:175:21)
at NodePath._call (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/path/context.js:55:20)
at NodePath.call (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/path/context.js:42:17)
at NodePath.visit (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/path/context.js:92:31)
at TraversalContext.visitQueue (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/context.js:116:16)
at TraversalContext.visitSingle (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/context.js:85:19)
at TraversalContext.visit (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/context.js:144:19)
at Function.traverse.node (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/index.js:82:17)
at traverse (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/index.js:62:12)
at transformFile (/home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/transformation/index.js:107:29)
at transformFile.next (<anonymous>)
friendly-errors 16:17:14
@ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
friendly-errors 16:17:14
✖ Client
Compiled with some errors in 9.04s
✔ Server
Compiled successfully in 16.89s
ℹ Waiting for file changes 16:17:21
ℹ Memory usage: 141 MB (RSS: 280 MB) 16:17:21
ℹ Listening on: http://localhost:3000/
Error: /home/mccrazy/Documents/codes/napp/.nuxt/client.js: Cannot find module '@babel/preset-env/lib/utils'
Require stack:
- /home/mccrazy/Documents/codes/napp/node_modules/@nuxt/babel-preset-app/src/polyfills-plugin.js
- /home/mccrazy/Documents/codes/napp/node_modules/@nuxt/babel-preset-app/src/index.js
- /home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/config/files/module-types.js
- /home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/config/files/configuration.js
- /home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/config/files/index.js
- /home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/index.js
- /home/mccrazy/Documents/codes/napp/node_modules/babel-loader/lib/index.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/node_modules/loader-runner/lib/loadLoader.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/lib/NormalModule.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/lib/NormalModuleFactory.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/lib/Compiler.js
- /home/mccrazy/Documents/codes/napp/node_modules/webpack/lib/webpack.js
- /home/mccrazy/Documents/codes/napp/node_modules/@nuxt/webpack/dist/webpack.js
- /home/mccrazy/Documents/codes/napp/node_modules/@nuxt/builder/dist/builder.js
- /home/mccrazy/Documents/codes/napp/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at n (/home/mccrazy/Documents/codes/napp/node_modules/jiti/dist/v8cache.js:2:2364)
at PluginPass.Program (/home/mccrazy/Documents/codes/napp/node_modules/@nuxt/babel-preset-app/src/polyfills-plugin.js:15:34)
at newFn (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/visitors.js:175:21)
at NodePath._call (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/path/context.js:55:20)
at NodePath.call (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/path/context.js:42:17)
at NodePath.visit (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/path/context.js:92:31)
at TraversalContext.visitQueue (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/context.js:116:16)
at TraversalContext.visitSingle (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/context.js:85:19)
at TraversalContext.visit (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/context.js:144:19)
at Function.traverse.node (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/index.js:82:17)
at traverse (/home/mccrazy/Documents/codes/napp/node_modules/@babel/traverse/lib/index.js:62:12)
at transformFile (/home/mccrazy/Documents/codes/napp/node_modules/@babel/core/lib/transformation/index.js:107:29)
at transformFile.next (<anonymous>)
friendly-errors 16:17:14
@ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
friendly-errors 16:17:14
✖ Client
Compiled with some errors in 9.04s
✔ Server
Compiled successfully in 16.89s
ℹ Waiting for file changes 16:17:21
ℹ Memory usage: 141 MB (RSS: 280 MB) 16:17:21
ℹ Listening on: http://localhost:3000/
Solution:
$ npm uninstall @babel/preset-env
$
npm i @babel/preset-env@7.12.17 -S
Comments
Post a Comment