我下载了老师的代码包,运行npm install 后 运行npm start, 报错了。
错误如下:
Error: Cannot find module 'html-webpack-plugin'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/yedongyu/Desktop/m10f3h/webpack.config.js:3:25)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-dianping-webpack@1.0.0 start: `NODE_ENV=dev webpack-dev-server --progress --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-dianping-webpack@1.0.0 start 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! /Users/yedongyu/.npm/_logs/2018-07-27T13_12_32_144Z-debug.log
这个是添加html组件后的报错:
+ html-webpack-plugin@2.30.1
updated 1 package in 3.715s
kanous-MacBook-Pro:m10f3h yedongyu$ npm start
> react-dianping-webpack@1.0.0 start /Users/yedongyu/Desktop/m10f3h
> NODE_ENV=dev webpack-dev-server --progress --colors
70% 1/1 build modules[HPM] Proxy created: /api -> http://localhost:3000
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EACCES 0.0.0.0:80
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at Server.setupListenHandle [as _listen2] (net.js:1338:19)
at listenInCluster (net.js:1396:12)
at doListen (net.js:1505:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-dianping-webpack@1.0.0 start: `NODE_ENV=dev webpack-dev-server --progress --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-dianping-webpack@1.0.0 start 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! /Users/yedongyu/.npm/_logs/2018-07-27T13_49_18_761Z-debug.log