运行环境
主机系统:windows10
虚拟机软件:virtual box
虚拟机系统:基于homestead创建的ubuntu 16.04
其它:使用vagrant启动和使用虚拟机系统
问题表现
在虚拟机中执行下面命令
npm run dev
出现以下提示:
Additional dependencies must be installed. This will only take a moment.
Running: npm install vue-template-compiler --save-dev --production=false
解决方式
- 报错提示是 :lightercollective: not found,执行命令
sudo npm i -g lightercollective
- 然后执行
SASS_BINARY_SITE=http://npm.taobao.org/mirrors/node-sass yarn --no-bin-links
- 执行
npm run watch-poll的时候如果提示 “Running: yarn add vue-template-compiler --dev --production=false Running: yarn add vue-template-compiler --dev --production=false“ ,执行命令
yarn add vue-template-compiler --dev --production=false --no-bin-links
本人无脑执行上面三条命令后
npm run watch-poll
或
npm run dev
执行正常。
致谢
在出现问题后参考了很多网友的解决思路,最终在下面链接文章 ezyx 的评论中找到了解决此问题的方法,特此表示感谢!