自学内容网 自学内容网

npm ERR! PhantomJS not found on PATH

安装phantomj时发生报错

old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /var/lib/elasticsearch/elasticsearch-head-master/node_modules/phantomjs-prebuilt
npm ERR! command failed
npm ERR! command sh -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-linux-x86_64.tar.bz2
npm ERR! Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
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:1278: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:
npm ERR!     /root/.npm/_logs/2024-10-10T07_33_45_342Z-debug-0.log

首先执行:

[root@elk-node-01 elasticsearch-head-master]# npm install phantomjs@2.1.1 --ignore-scripts

然后再执行:

[root@elk-node-01 elasticsearch-head-master]# npm install


原文地址:https://blog.csdn.net/m0_66011019/article/details/142823405

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!