Reason: element UI in .Babel is repeated
Solution: remove duplicate code in babel.config.js
Before modification
module.exports = {
"presets": [
"@vue/cli-plugin-babel/preset"
],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
],
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
After modification
module.exports = {
"presets": [
"@vue/cli-plugin-babel/preset"
],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
Read More:
- [Solved] Error:Plugin/Preset files are not allowed to export objects, only functions
- Vue Error: [Vue warn]: Duplicate keys detected
- [Solved] Vue Error: Duplicate keys detected: ‘74004’. This may cause an update error
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- [Solved] Syntax Error: Error: Cannot find module ‘@vue/babel-preset-app‘
- [Solved] Parsing error: No Babel config file detected for XXX
- [Solved] Vue Error: Parsing error:No Babel config file detected for xxx
- [Solved] Vue Error: Parsing error: No Babel config file detected for
- [Solved] Vue Project Start Error: Support for the experimental syntax ‘jsx‘ isn‘t currently enabled
- [Modified] svg loader Error: Plugin name should be specified
- [Solved] arco design vite-plugin-style-import Load menu-item error: Internal server error…
- [Solved] Vue Error: Parsing error: No Babel config file detected for /Users/Usename/xxx…
- [Solved] vue run serve Error: ValidationError: Progress Plugin Invalid Options
- [Solved] vueCli 4.x Upgrade to 5.x Error: Progress Plugin Invalid Options
- [Solved] Failed to load plugin ‘vue‘ declared in ‘.eslintrc.js‘: createRequire is not a function
- [Solved] Syntax Error: Error: Loading PostCSS Plugin failed: Cannot find module ‘autoprefixer‘
- [Solved] Failed to compile with 1 error. Syntax Error: Error: Loading PostCSS Plugin failed: Cannot find modul
- [Solved] Error: postcss plugin autoprefixer requires postcss 8 error report problem repair
- [Solved] Vue installs postcss pxtorem Error: Syntax Error: Error: Loading PostCSS Plugin failed…
- [Solved] SyntaxError: Cannot use import statement outside a module