繁体   English   中英

为什么npm尝试安装phantomjs?

[英]why does npm tries to install phantomjs?

我找不到解决方案:我只是在pi(树莓派)上设置了一个新的Linux发行版,并希望使用一个npm命令安装这些软件包:

npm install telegraf blocktrail-sdk http请求cookie-parser express-ipfilter googleapis express body-parser cron firebase-admin

几秒钟后,我看到npm尝试安装名为phantomjs的软件包,并显示以下错误消息:

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130

> phantomjs@1.9.20 install /home/pi/node_modules/phantomjs
> node install.js

PhantomJS not found on PATH
Unexpected platform or architecture: linux/arm
It seems there is no binary available for your platform/architecture
Try to install PhantomJS globally

现在奇怪的是,当我尝试一一安装这些软件包时:

npm install telegraf ... npm install blocktrail-sdk和其他的

它不需要安装phantomjs作为依赖项。 但是为什么要尝试安装呢? 我想念什么?

任何帮助都将非常棒! 谢谢!

phantomjs软件包是您正在安装的blocktrail-sdk软件包的子依赖项。

$ npm ls phantomjs
`-- blocktrail-sdk@3.0.14
  `-- html-pdf@1.0.0
    `-- phantomjs@1.9.20

问题phantomjs找不到Linux / ARM平台的二进制文件。

一种解决方法是克隆blocktrail-sdk库,从package.jsondependencies字段中删除html-pdf ,然后在本地npm install "../path/to/blocktrail-sdk"npm install "../path/to/blocktrail-sdk"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM