即使安装了依赖项,“纱线启动”也会引发“找不到命令”错误

时间:2019-01-22 22:00:41

标签: webpack yarnpkg

yarn list显示我已经安装了webpack-dev-server依赖项。

enter image description here

但是,当我运行yarn start时,出现以下错误:

yarn run v1.13.0
warning package.json: No license field
$ webpack-dev-server
/bin/sh: webpack-dev-server: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

如果我运行npm install webpack-dev-server,就可以克服此错误,但是我知道不建议混合使用两个软件包管理器。有什么想法可以单独使用Yarn来解决此问题吗?

0 个答案:

没有答案