npm install 报错:PhantomJS not found on PATH

npm install 报错:PhantomJS not found on PATH

整体报错内容

shell 复制代码
npm ERR! code 1
npm ERR! path G:\work-learn\open-coding\bruno\node_modules\phantomjs-prebuilt
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! PhantomJS not found on PATH
npm ERR! Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip
npm ERR! Saving to C:\Users\123\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
npm ERR! Receiving...
npm ERR! Error making request.
npm ERR! Error: connect ETIMEDOUT 20.205.243.166:443
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16)
npm ERR!
npm ERR! Please report this full log at https://github.com/Medium/phantomjs

npm ERR! A complete log of this run can be found in: C:\Users\123\AppData\Local\npm-cache\_logs\2024-07-12T05_29_42_872Z-debug-0.log  

解决方案

首先执行

shell 复制代码
npm install phantomjs@2.1.1 --ignore-scripts

之后再次执行

shell 复制代码
npm install

成功解决,不再报错

相关推荐
计算机魔术师1 小时前
特朗普上台打给黄仁勋:AI末日论是骗局,我们绝不让它发生
前端
troy1281 小时前
Python 基础语法(八):Web 后端开发、数据分析与可视化、网络爬虫、人工智能 / 大模型应用
前端·python·数据分析
计算机魔术师1 小时前
CEO说要慢下来,黑客说别做梦了——同一篇论文,两种命运
前端
kyriewen2 小时前
我花3天抓了一个幽灵bug,凶手藏在第4层
前端·javascript·程序员
IT_陈寒3 小时前
Java里用Stream.parallel()翻车实录,这性能还不如单线程
前端·人工智能·后端
wangchunyu1143 小时前
JavaScript 零基础入门教程
前端
hanchenxing3 小时前
前端异步任务三方案:Celery vs Redis Stream vs BullMQ 实战对比消息队列
前端·数据库·redis·异步任务·方案对比
默_笙4 小时前
⚓ AI 的"官方答题卡":withStructuredOutput 与结构化输出的终局之战
前端·javascript
掘金挖土4 小时前
前端手摸手跑路之 AI 应用开发(五)
前端·后端
抓不住时间的沙4 小时前
Butterfly主题 5.7 导航栏添加相册同时设置相册入口密码
css·python·node.js