我找不到解决方案:我只是在我的pi(raspian)上设置了一个新的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作为依赖项。但为什么要尝试安装呢?我错过了什么?
任何帮助都会非常棒!谢谢!
答案 0 :(得分:2)
phantomjs
包是您正在安装的blocktrail-sdk
包的子依赖项。
$ npm ls phantomjs
`-- blocktrail-sdk@3.0.14
`-- html-pdf@1.0.0
`-- phantomjs@1.9.20
issue phantomjs
无法为Linux / ARM平台找到二进制文件。
解决方法可能是克隆blocktrail-sdk
存储库,从html-pdf
中的dependencies
字段中删除package.json
,然后在本地安装:npm install "../path/to/blocktrail-sdk"