下载一个vue项目执行npm install 后运行项目npm run dev后出错 - 问题解决

在SVN上拉下来一个vue项目,上面没有提交项目里面的node_modules文件夹,所以要自己执行 npm install 安装,但安装完后运行项目后却报错了:

$ npm run dev

> poverty@1.0.0 dev F:\05 poverty alleviation project\poverty-git
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
。。。。。此处省略加载的进度。。。。。
94% asset optimization ERROR Failed to compile with 7 errors15:16:02

//中间部分都是同下面的一种错误
error in ./src/assets/css/home/dataProfile.scss Module build failed: Error: ENOENT: no such file or directory, scandir 'F:\05 poverty alleviation project\poverty-git\node_modules\node-sass\vendor'
at Object.fs.readdirSync (fs.js:904:18)
at Object.getInstalledBinaries (F:\05 poverty alleviation project\poverty-git\node_modules\node-sass\lib\extensions.js:129:13)
at foundBinariesList (F:\05 poverty alleviation project\poverty-git\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (F:\05 poverty alleviation project\poverty-git\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (F:\05 poverty alleviation project\poverty-git\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (F:\05 poverty alleviation project\poverty-git\node_modules\node-sass\lib\binding.js:15:30)
at Object.<anonymous> (F:\05 poverty alleviation project\poverty-git\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.sassLoader (F:\05 poverty alleviation project\poverty-git\node_modules\sass-loader\lib\loader.js:24:22) @ ./src/assets/css/home/dataProfile.scss 4:14-222 13:3-17:5 14:22-230
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/iview-loader??ref--0-1!./src/pages/home/dataProfile.vue
@ ./src/pages/home/dataProfile.vue
@ ./src/router/routers.js
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

考虑是没有把需要的插件或者包都安装下来,所以就重新执行了一次 npm install ,然后根据报错信息,重新安装ajv(没见过这玩意,这个是什么呢?)

$ npm install
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself. audited 33495 packages in 10.919s
found 16 vulnerabilities (1 low, 10 moderate, 4 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details $ npm install ajv@^6.0.0
+ ajv@6.5.2
added 6 packages from 1 contributor, updated 3 packages and audited 33501 packages in 14.673s
found 16 vulnerabilities (1 low, 10 moderate, 4 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details

然后下一步重新执行 npm run dev 就可以运行代码了。

上一篇:python-给定两个元组列表,找到它们之间最接近的元组(dist


下一篇:浅谈js拖拽