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

成功解决,不再报错

相关推荐
vipbic4 小时前
别再把“做个H5”挂嘴边了:这个词,官方压根就没有定义过
前端
ZC跨境爬虫6 小时前
跟着 MDN 学CSS day_39:(Flexbox 弹性盒子核心机制)
前端·css·ui·html·tensorflow
小陈同学呦6 小时前
前端如何处理订单状态导航的数据竞态问题
前端·javascript
喵个咪6 小时前
GoWind Toolkit 前端代码生成|Vue3(ElementPlus/Vben)、React(AntDesign)全自动一键生成教程
前端·vue.js·react.js
摆烂大大王8 小时前
玩转 OpenClaw:用 TaskFlow + Heartbeat 打造自动化工作流
前端·人工智能·自动化
zhangxingchao8 小时前
AI 大模型核心六:量化、Workflow 与 Agent、多轮 RAG
前端·人工智能·后端
梦想的颜色8 小时前
TypeScript 完全指南(上):从零开始掌握类型系统
前端·typescript
之歆8 小时前
Day01_ES6+ 专业指南:从基础到实战的现代JavaScript开发(下)
前端·javascript·es6
lichenyang4539 小时前
鸿蒙 MVVM 实战:从 Demo 到工程化,聊聊登录、状态管理与埋点系统设计
前端
IT_陈寒9 小时前
Vite打包时遇到的坑,原来问题出在这里
前端·人工智能·后端