Vue init webpack 下载依赖卡住不动解决方法
https://blog.csdn.net/qq_38295704/article/details/89737689有时候下载依赖的时候网速不行,这时候我们选择手动下载依赖有时候下载依赖的时候网速不行,这时候我们选择手动下载依赖:选择 No,I will handle that myself生成完项目之后,再cd进入项目文件夹,然后再npm install 安装即可。但是如果真的...
·
https://blog.csdn.net/qq_38295704/article/details/89737689
有时候下载依赖的时候网速不行,这时候我们选择手动下载依赖
- 有时候下载依赖的时候网速不行,这时候我们选择手动下载依赖:选择 No,I will handle that myself
- 生成完项目之后,再cd进入项目文件夹,然后再npm install 安装即可。
- 但是如果真的安装“个把”小时也没成功那就用:cnpm install 吧
npm install --registry=https://registry.npm.taobao.org
一次性安装依赖
如果安装过程中等待太久,我们难免会不耐烦,所以会中途关闭项目。那么我们接下操作 npm run dev 肯定是报错的

正确做法:cd进入项目文件夹,然后再npm install 安装完。如果还是安装“个把”小时也没成功那就用:cnpm install
第二种:
采用cnpm的安装方式,本质是也是切换镜像源。先安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
#目的是安装cnpm这个库,也是采用一次性使用淘宝镜像的方式
再在安装npm包时把npm 改为cnpm即可,比如安装vue
cnpm install vue
再执行 npm run dev

成功!!!
更多推荐



所有评论(0)