admin管理员组文章数量:1200965
Having a little trouble with React. Does anyone know how I can install the peer of webpack@^4.x.x?
This is the error I am recieving when I try to run
webpack-dev-server
in cmd. It just returns
[email protected] requires a peer of webpack@^4.x.x but none is installed. You must install peer dependencies yourself.
Having a little trouble with React. Does anyone know how I can install the peer of webpack@^4.x.x?
This is the error I am recieving when I try to run
webpack-dev-server
in cmd. It just returns
[email protected] requires a peer of webpack@^4.x.x but none is installed. You must install peer dependencies yourself.
Share
Improve this question
asked Jul 11, 2018 at 20:36
AllanAllan
3511 gold badge2 silver badges11 bronze badges
0
2 Answers
Reset to default 16webpack-dev-server
has Webpack as a peer dependency, which means that you are responsible for installing that yourself.
You could install the latest version of Webpack and add it to your devDependencies
with the following command:
npm i -D webpack@latest
By writing webpack-dev-server
you are also trying to use the globally installed version of that package. You can use the locally installed one instead by adding it to a script in your package.json
:
{
"scripts" : {
"start": "webpack-dev-server"
}
}
If you need webpack
updated globally to the latest version, you can run:
npm install -g webpack
本文标签: javascriptwebpackcli308 requires a peer of webpack4xx but none is installedStack Overflow
版权声明:本文标题:javascript - webpack-cli@3.0.8 requires a peer of webpack@^4.x.x but none is installed - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738618663a2103062.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论