簡體   English   中英

如何找出哪些包與哪個版本的 Node 兼容?

[英]How to find out which packages are compatible with which version of Node?

所以我遇到了 PhantomJS package 的問題。 這是一個簡短的日志詳細信息:

npm ERR! node v4.2.4
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! phantomjs@1.9.17 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs@1.9.17 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.

遇到這個問題讓我思考如何確定 package 是否與某個版本的節點兼容? 我想知道是否有特定的節點資源/指南可以用來檢查 package 兼容性,或者社區中的其他人使用什么流程來檢查這些東西?

Package maintainers can specify compatible Node.js versions in the engine field in package.json of their package. 請參閱此處的文檔:

https://docs.npmjs.com/files/package.json#engines

但是,此字段不是強制性的,因此有大量軟件包不提供有關兼容版本的信息。 如果package.json不包含engines字段,則值得查看 package 文檔,有時它包含兼容性信息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM