npm WARN … requires a peer of … but none is installed. You must install peer dependencies yourself

前端 未结 10 884
不知归路
不知归路 2020-11-29 15:44

I tried to run a project downloaded from github. Unfortunately, during npm install the following warnings were shown. I tried to change the version based on thi

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 16:08

    For each error of the form:

    npm WARN {something} requires a peer of {other thing} but none is installed. You must install peer dependencies yourself.
    

    You should:

    $ npm install --save-dev "{other thing}"
    

    Note: The quotes are needed if the {other thing} has spaces, like in this example:

    npm WARN rollup-plugin-uglify@6.0.3 requires a peer of rollup@>=0.66.0 <2 but none was installed.
    

    Resolved with:

    $ npm install --save-dev "rollup@>=0.66.0 <2"
    

提交回复
热议问题