vue项目windows运行正常, linux运行失败 大小写问题导致Module not found: Error
ERROR in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/view/home/index.vue Module not found: Error: Can't resolve '@/components/EpidemicPrevent/epidemicPreventLeft' in '/home/sourse/shell/forest-digitalForest/src/view/home'
或者如下错误:
ERROR in ./src/main.js Module not found: Error: Can't resolve 'Vue-highcharts' in '/home/JenkinsHome/workspace/forest-big/src' @ ./src/main.js 27:0-43
linux环境区分大小写
windows不区分大小写
他说Vue-highcharts
在 ./src/main.js文件下面找不到,
然后我们查看package.json文件:
对应的是小写的!!!!!!
解决方案就是在main.js 把V改成小写的v。
注意: 权限问题
ERR! stack Error: EACCES: permission denied, mkdir
需要如下命令:
npm i --unsafe-perm