Cannot start nuxt: Named export 'ESBuildMinifyPlugin' not found
See original GitHub issueEnvironment
- Operating System:
Linux
- Node Version:
v16.13.0
- Nuxt Version:
3.0.0-27319101.3e82f0f
- Package Manager:
yarn@1.22.15
- Bundler:
Webpack
- User Config:
vite
- Runtime Modules:
-
- Build Modules:
-
Reproduction
npx nuxi init nuxt3-app
cd nuxt3-app
yarn install
- Add
vite: false
tonuxt.config.js
yarn dev
Describe the bug
ERROR Cannot start nuxt: Named export 'ESBuildMinifyPlugin' not found. The requested module 'esbuild-loader' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'esbuild-loader';
const { ESBuildMinifyPlugin } = pkg;
import { ESBuildMinifyPlugin } from 'esbuild-loader';
^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'ESBuildMinifyPlugin' not found. The requested module 'esbuild-loader' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'esbuild-loader';
const { ESBuildMinifyPlugin } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async bundle (node_modules/nuxt3/dist/index.mjs:1156:31)
at async build (node_modules/nuxt3/dist/index.mjs:1132:3)
at async load (node_modules/nuxi/dist/chunks/dev.mjs:6719:9)
at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6756:5)
at async _main (node_modules/nuxi/dist/chunks/index.mjs:382:7)
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Common Issues - Nuxt Vite
does not provide an export named 'default'. Vite has an issue for pre-bundling dependencies with named exports (#56 ). Workaround is to exlude ......
Read more >API - esbuild
This API call is used by the command-line interface if no input files are provided and the --bundle flag is not present. In...
Read more >Nuxt export 'default' (imported as 'mod') was not found
You will need atleast an empty export default script in your vue files to not see this error. If you don't have any...
Read more >Make your Nuxt.js webpack builds faster - BestofVue
While you won't be able to achieve instant app starts anytime soon, ... description from Nuxt2 SyntaxError: Named export 'ESBuildMinifyPlugin' not found.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For now, you can workaround this by pinning
esbuild-loader
to the previous minor version. For example, with yarn:same issue