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 install
或npm cache clean
和重新安装软件包npm install
。