请教:按照react技术栈后面搭建环境运行报错
devinxiang opened this issue · 1 comments
$ npm run start
first_react_app@0.0.1 start G:\workspaces\fe_workspaces\react\深入react技术栈\ react_develop\first_react_app
node server.js
module.js:529
throw err;
^
Error: Cannot find module './webpack.config'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object. (G:\workspaces\fe_workspaces\react\深入react技术栈\rea ct_develop\first_react_app\server.js:4:14)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first_react_app@0.0.1 start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first_react_app@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aladdin\AppData\Roaming\npm-cache_logs\2017-11-18T13_29_4 8_993Z-debug.log
- 是因为在install的时候安装部分组件不成功,可以使用淘宝镜像安装:
npm install -g cnpm --registry=https://registry.npm.taobao.org
,或者使用这个方法:lmk123/blog#28 - 这边还需要注意node版本,我的原先是最新的,后面降到6.10。