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

成功解决,不再报错

相关推荐
asong18 小时前
从写代码到部署上线,Cloudflare 给 AI 配了一把新钥匙
前端·javascript·后端
用户53723128824619 小时前
你的 WGSL 从未被执行过——一个 secure context 静默陷阱的排查实录
前端
Daniel_12319 小时前
轻量级站点监控面板 LightPing 开源啦
前端·后端·github
想风19 小时前
A/B 测试怎么做?独立站转化率优化的完整实操步骤
前端·后端·github
lerhxx19 小时前
从 Markdown 到生成式 UI:AI 应用中的流式渲染实践
前端·javascript
迅猛龙办公室19 小时前
python实现简单进度条
java·前端·python
Rosanci19 小时前
Codex 下载与本地部署实战:从安装到运行全流程指南
开发语言·前端·算法·chatgpt·codex
zhangzeyuaaa19 小时前
深入 Ruby:Block、Proc、Lambda 核心区别与最佳实践
开发语言·前端·ruby
liangshanbo121520 小时前
前端高级面试题:WebSocket 双向流式通信怎么设计?
前端·websocket·网络协议
可乐鸡翅yeah_20 小时前
新手梳理:HLS 线上问题,哪些该提给 CDN,哪些该找后端切片服务
开发语言·前端·javascript·vue.js·网络协议·http·m3u8在线