代码语言:javascript复制
ERROR in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/achievement/CategoryDepart.vue
Module not found: Error: Can't resolve '@/components/achievement/echartsPage' in '/app/src/views/achievement'
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/achievement/CategoryDepart.vue 15:0-63
@ ./src/views/achievement/CategoryDepart.vue
@ ./src/router/router.config.js
@ ./src/router/index.js
@ ./src/main.js
@ multi babel-polyfill ./src/main.js
ERROR in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/achievement/MoneyDepart.vue
Module not found: Error: Can't resolve '@/components/achievement/echartsPage' in '/app/src/views/achievement'
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/achievement/MoneyDepart.vue 15:0-63
@ ./src/views/achievement/MoneyDepart.vue
@ ./src/router/router.config.js
@ ./src/router/index.js
@ ./src/main.js
@ multi babel-polyfill ./src/main.js
ERROR in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/achievement/MarketDepart.vue
Module not found: Error: Can't resolve '@/components/achievement/echartsPage' in '/app/src/views/achievement'
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/achievement/MarketDepart.vue 15:0-63
@ ./src/views/achievement/MarketDepart.vue
@ ./src/router/router.config.js
@ ./src/router/index.js
@ ./src/main.js
@ multi babel-polyfill ./src/main.js
Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tp-pc-kpi@1.0.0 build: `node build/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tp-pc-kpi@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-03-17T08_39_43_971Z-debug.log
错误原因是找不到模块
代码语言:javascript复制Module not found: Error: Can't resolve '@/components/achievement/echartsPage' in '/app/src/views/achievement'
cat src/views/achievement/CategoryDepart.vue
代码语言:javascript复制import { mapState } from 'vuex'
import SingleDate from '@/components/achievement/SingleDate'
import EvalKpi from '@/components/achievement/EvalKpi'
import EchartsPage from '@/components/achievement/echartsPage'
import common from '@/api/common'
发现其他模块的首字母大写,这里@/components/achievement/echartsPage的echartsPage首字母小写了。