npm安装webpack时,报错npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed

 

npm安装webpack时,报错npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed

报错

WARN ajv-[email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-[email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.

解决方式:

您可以使用npm-install-peers查找并安装所需的对等体依赖关系。

先使用npm install -g npm-install-peers后再安装npm install webpack 就不会报错

如果在更新任何软件包版本后出现此错误,请删除node_modules目录并使用npm installnpm cache clean和重新安装软件包npm install

猜你喜欢

转载自blog.csdn.net/gabby____/article/details/90180460
今日推荐