执行npm run dev就失败了
vue 安装成功,项目创建也成功了,执行npm run dev就失败了,失败结果
> test1@1.0.0 dev /Users/ann/test1
> 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! test1@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 test1@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! /Users/ann/.npm/_logs/2018-10-28T08_11_37_746Z-debug.log
,npm -v也显示版本的。
有时候执行其他命令会出现command not found,比如我想用brew安装node就会出现-bash: brew: command not found。
我是mac电脑,请求高手老师帮忙,困扰好多天了,万分感谢