npm i --legacy-peer-deps

npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

1、原因:npm 升级到 7.x以上后,会出现上游依赖冲突;–legacy-peer-deps:安装时忽略所有 peerDependencie,默认使用npm 4-6版本的安装模式,安装过程中是会跳过对等依赖项。

ERROR: Failed to set up Chromium r756035! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm i puppeteer --ignore-scripts

2、报错无法安装chromedriver的问题

npm install --ignore-scripts

你可能感兴趣的:(npm,前端,node.js)