启动npm错误(npm安装--保存开发人员网页包)

启动npm错误(npm安装--保存开发人员网页包),npm,webpack,Npm,Webpack,你能帮我解决这个问题吗? 我想为GitHub上的rebus项目做贡献,所以我克隆了它,并添加了一个rebus对象。 在安装和更新nodejs和npm后,在虚拟机中通过linux本地运行游戏。然后,我启动了npm。 但结果如下 > rebus@1.0.0 start /home/mara/opso/rebus > webpack-dev-server --mode development sh: 1: webpack-dev-server: not found npm ERR! L

你能帮我解决这个问题吗? 我想为GitHub上的rebus项目做贡献,所以我克隆了它,并添加了一个rebus对象。 在安装和更新nodejs和npm后,在虚拟机中通过linux本地运行游戏。然后,我启动了
npm
。 但结果如下

> rebus@1.0.0 start /home/mara/opso/rebus
> webpack-dev-server --mode development

sh: 1: webpack-dev-server: not found

npm ERR! Linux 5.0.0-36-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! rebus@1.0.0 start: `webpack-dev-server --mode development`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the rebus@1.0.0 start script 'webpack-dev-server --mode development'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the rebus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server --mode development
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs rebus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls rebus
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mara/opso/rebus/npm-debug.log
搜索解决问题后,我发现我必须执行
sudo npm安装-g webpack dev server
但错误仍然存在

/usr/local/bin/webpack-dev-server -> /usr/local/lib/node_modules/webpack-dev-server/bin/webpack-dev-server.js
npm WARN webpack-dev-server@3.10.1 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.7.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ webpack-dev-server@3.10.1
added 400 packages from 272 contributors in 28.25s

您能帮助我如何解决此问题并成功执行“npm启动”吗?

您需要添加此依赖项


npm安装--保存开发人员网页包

events.js:183 thrower;//未处理的“错误”事件^npm ERR!Linux 5.0.0-36-通用npm错误!argv“/usr/bin/node”“/usr/bin/npm”“start”npm ERR!节点v8.10.0 npm错误!npm v3.5.2 npm错误!代码ELIFECYCLE npm ERR!rebus@1.0.0开始:
webpack开发服务器——模式开发
npm错误!退出状态1(但仍然是相同的问题)遵循此链接