关于vue的一项报错

PS H:\泰昌\taich> npm run dev
npm WARN npm npm does not support Node.js v10.7.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

> taich@1.0.0 dev H:\泰昌\taich
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 1 1 1 1 1   1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 16 1 16 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 4 4 4 44 4  4 94% asset optimization

 ERROR  Failed to compile with 9 errors                                                                                                          16:37:37
This dependency was not found:

* @/views/supplier/basicSettings/processRole in ./src/router/index.js

To install it, you can run: npm install --save @/views/supplier/basicSettings/processRole


These relative modules were not found:

* ../../../assets/u998.png in ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-1f92ed5c","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/supplier/equipmentManagement/dieManagement.vue, ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-06216c63","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/supplier/equipmentManagement/machineManagement.vue
* ./footer in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/layout/AppMain.vue
* ../../assets/u7.png in ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-2a732f9c","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/login/login.vue, ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-0651e698","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/layout/TopNavigationBar.vue
* ../../assets/logo.png in ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-0651e698","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/layout/TopNavigationBar.vue
* ./fonts/element-icons.woff in ./node_modules/css-loader??ref--6-1!./node_modules/postcss-loader/lib??ref--6-2!./node_modules/element-ui/lib/theme-chalk/index.css
* ./fonts/element-icons.ttf in ./node_modules/css-loader??ref--6-1!./node_modules/postcss-loader/lib??ref--6-2!./node_modules/element-ui/lib/theme-chalk/index.css

在公司用SVN上传的代码,回家后下载出来打开报这种错误,在公司能够正常打开,但是在家里却打不开了。只记得当时安装了jquery改了一下webpack的配置,然后回家下载出来就开始报错。将引入的图片注释掉能够正常使用NPM RUN DEV打开,路径都是正确的,还请大神有空的时候帮忙看一下 谢谢

压缩后再打开也是正常的 只有svn的时候会出问题

阅读 3.3k
2 个回答

看原因貌似是npm 版本 和 nodejs 版本不匹配导致错误

两台电脑装的node.js版本不一致,npm一般在安装node.js时候就同时已经安装了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题