-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
1.4.12
Environment
Mac
chrome80,
vue 2.6.11
"dependencies": {
"ant-design-vue": "^1.4.12",
"core-js": "^3.6.4",
"vue": "^2.6.11"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.2.0",
"@vue/cli-plugin-eslint": "~4.2.0",
"@vue/cli-service": "~4.2.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.1.2",
"vue-template-compiler": "^2.6.11"
},
Reproduction link
https://cli.vuejs.org/guide/creating-a-project.html
Steps to reproduce
- vue create hello-world
- select default 等待安装依赖完成
- yarn serve 启动正常
- yarn add ant-design-vue
- 修改main.js
import Vue from 'vue';
import App from './App.vue';
// 增加以下两行代码
import { Button } from 'ant-design-vue';
Vue.use(Button);
Vue.config.productionTip = false;
new Vue({
render: h => h(App),
}).$mount('#app');
yarn serve 无法启动了
如果不能复现问题,执行yarn upgrade,再启动
What is expected?
正常启动
What is actually happening?
/usr/local/bin/node /Users/zhanqi/.config/yarn/global/node_modules/yarn/bin/yarn.js run serve
yarn run v1.22.4
$ vue-cli-service serve
INFO Starting development server...
ERROR Failed to compile with 7 errors 12:18:13 PM
These dependencies were not found:
* core-js/library/fn/array/from in ./node_modules/babel-runtime/core-js/array/from.js
* core-js/library/fn/get-iterator in ./node_modules/babel-runtime/core-js/get-iterator.js
* core-js/library/fn/is-iterable in ./node_modules/babel-runtime/core-js/is-iterable.js
* core-js/library/fn/object/assign in ./node_modules/babel-runtime/core-js/object/assign.js
* core-js/library/fn/object/define-property in ./node_modules/babel-runtime/core-js/object/define-property.js
* core-js/library/fn/symbol in ./node_modules/babel-runtime/core-js/symbol.js
* core-js/library/fn/symbol/iterator in ./node_modules/babel-runtime/core-js/symbol/iterator.js
To install them, you can run: npm install --save core-js/library/fn/array/from core-js/library/fn/get-iterator core-js/library/fn/is-iterable core-js/library/fn/object/assign core-js/library/fn/object/define-property core-js/library/fn/symbol core-js/library/fn/symbol/iterator
Process finished with exit code 2