关于 yarn install 报错的问题
yarn install报错一直解决不了的同学可以试试在本地执行
1.先把node_modules文件夹删除
2.在本地项目的根目录下用命令行执行npm install
3.上一步没报错的话再执行npm install vue-template-compiler --save-dev --production=false
4.然后到虚拟机里执行npm run dev。。完美,执行的时候可以看你本地的node_modules目录里的文件变化,其实报错都是因为文件没有下载完全。。
:sob:找了好久解决方法
yarn config set registry https://registry.npm.taobao.org
以上方法亲测有效,laravel版本:6.x;
另外注意更新npm到最新版本
20191217
windows10可执行以下命令: 1.$ rm -rf node_modules 2.$ yarn config set registry http://registry.cnpmjs.org 3.$ yarn install --no-bin-links 4.$ npm install cross-env --save-dev 5.$ npm run watch-poll 或者 npm run dev 2020/02/18 测试
:+1:问题解决了
太棒了,完美!!!!
@Aexus 的方法解决了我的问题。
我的解决步骤如下:
node_modules
完全删除,执行:yarn
的registry
:package.json
中的组件:vue-template-compiler
组件:package.json
干掉四个地方的cross-env
。npm run dev
或npm run watch-poll
了:谢谢完美解决了