问题:npm run build在window平台构建成功,liunx平台失败
步骤:
- 在项目根目录执行npm install 执行成功
- 在根目录执行npm run build报错
报错信息如下:
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve 'React' in '/root/temp/hahaha/emos-web/src/main/js/src/component'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! emos-web@1.0.0 build: `node src/main/js/scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the emos-web@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/2017-10-17T03_38_11_787Z-debug.log
有没有遇到类型情况的朋友,望指点!!!
补充src/main/js/src/component下的目录结构