vue脚手架 @vue/cli3.0.x运行项目提示with message spawn vue-cli-service ENOENT
vue脚手架 @vue/cli3.0.x运行项目提示Error while running task C:Usersxxxxxxxx:serve with message spawn vue-cli-service ENOENT
- 删除项目中的 【node_modules】文件夹和 【package-lock.json】文件
- 进入命令窗口cmd,进入项目目录,最后执行 npm install
- vue ui
再次运行就不会出现这个问题了。具体是如何导致的,我也不太清楚,查看网上大佬们说的是[你安装的时候可能用的npm进行安装,然后cli内部的有可能和它不一致],至于具体是不是,欢迎大家评论
--------------------------------------
Error running vue:
Error while running task E:\ vue \cistudy-frontend:serve with message ‘spawn’ vue-cli-service ENOENT ‘
The solution is as follows:
re-import the project in the vue visual interface will prompt the lack of “node_modules dependency”. The previous choice was still to import, this time choose to install the node_modules dependency and then import, the installation steps are as follows:
- in CMD into the project directory (this is very important!!
- execute NPM install
- re-import in the visualization panel.