ec2-user:~/environment/todo $ npm run dev
したら
todo@1.0.0 dev /home/ec2-user/environment/todo webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
sh: webpack-dev-server: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! todo@1.0.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the todo@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in: npm ERR! /home/ec2-user/.npm/_logs/2019-05-17T14_42_37_328Z-debug.log
ぐぐったらこれが出てきたので
npm install webpack-dev-server -g
したけど、
todo@1.0.0 dev /home/ec2-user/environment/todo webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
module.js:550 throw err; ^
Error: Cannot find module 'webpack'
at Function.Module.resolveFilename (module.js:548:15)
at Function.Module.load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todo@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in: npm ERR! /home/ec2-user/.npm/_logs/2019-05-17T14_46_24_350Z-debug.log