npm创建vue项目

1、node.js官网下载node,并安装;

安装

2、window+R快捷键打开cmd

npm config set prefix "D:\nodejs\node_global"

npm config set cache "D:\nodejs\node_cache"

设置淘宝镜像:

npm config set registry=http://registry.npm.taobao.org

错误解决办法:将项目里的“node_modules”文件夹删除,然后在cmd中cd到项目目录,依次运行命令:npm install和npm run build,最后运行npm run dev后项目成功运行。

 

安装完成啦!

猜你喜欢

转载自www.cnblogs.com/ylyCherry/p/10024545.html