npm install -g cnpm --registry=https://registry.npm.taobao.org
安装:
npm i @vue/babel-preset-app
安装:
cnpm i --save-dev webpack@4 webpack-cli
安装:
cnpm i util.promisify
安装:
cnpm i es-abstract
安装:
cnpm i cache-loader
解决方案
首先,升级core-js,执行命令npm install core-js@3 --save
然后再执行npm install async-validator@1.11.5 --save
若是还没有效果,那就再执行npm i -D babel-plugin-component
配置babel.config.js
:
module.exports = {
"presets": [
'@vue/cli-plugin-babel/preset',
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": 3
}
]
],
"plugins": [
["component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
],
'env': {
'development': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
'plugins': ['dynamic-import-node']
}
}
}