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
相关推荐
薛定喵的谔7 小时前
我开源了一个精致的 Next.js 博客模板:Skyplume
前端·前端框架·next.js
张龙6877 小时前
构建生产级 AI Agent:工具调用与记忆架构实战指南
前端
kyriewen8 小时前
2026 年了,还在用 Node.js?Bun 迁移实战:20 分钟搞定,附踩坑记录
前端·javascript·node.js
青山Coding10 小时前
Cesium应用(八):物体运动的实现思路
前端·cesium
用户416596736935510 小时前
Android WebView 加载 file:// 离线页面调试教程
android·前端
Asmewill10 小时前
curl命令学习笔记一
前端
我是一只快乐的小螃蟹10 小时前
1.2 ArrayList 源码解析
前端
星栈10 小时前
我用 Rust + Dioxus 做了个全栈跨平台笔记应用:再把新建、编辑和交付补上
前端·rust·前端框架
我是一只快乐的小螃蟹10 小时前
1.1 HashMap (JDK1.8) 源码解析
前端
爱勇宝13 小时前
小红花成长新版:模板来了,鼓励也更容易开始
前端·后端·程序员