Fork me on GitHub

vue.js安装问题

 

1.安装:npm install --global vue-cli

2.创建项目:vue init webpack my-project
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! Unexpected end of JSON input while parsing near '...":"3.9.1","gulp-babel'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ASUS\AppData\Roaming\npm-cache\_logs\2018-10-29T13_18_16_946Z-debug.log

3.解决办法:npm cache clean --force

4.npm install

 

还有一种常见的错误:报Vue不是内部命令:

解决方案:配置npm环境变量:注意只有电脑重启,才能生效


posted @ 2018-10-29 21:33  欢欢11  阅读(224)  评论(0编辑  收藏  举报