我正在尝试在 Ubuntu 20.04 上全局安装 Puppeteer (https://pptr.dev/):
$ sudo npm install puppeteer -g
我收到此错误消息:
npm error code 1
npm error path /usr/local/lib/node_modules/puppeteer
npm error command failed
npm error command sh -c node install.mjs
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-05-03T19_37_45_119Z-debug-0.log
我的节点版本是v18.20.2 我的 npm 版本是 10.5.0
什么可能导致此错误?
npm install --ignore-scripts puppeteer
为我工作。谢谢!