簡體   English   中英

無法安裝 PhantomJS 以在 node.js 中使用

[英]Cannot install PhantomJS for use in node.js

這是整個交易……至少是我能看到的部分。 我安裝了幾個 npm 包,它們都可以工作,除了 phantomjs(不是 phantom)。 這是整個交易……至少是我能看到的部分。

> npm install phantomjs
\
> phantomjs@1.9.18 install C:\server\nodejs\node_modules\phantomjs
> node install.js

'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\server\\nodejs\\\\node.exe" "C:\\server\\nodejs   \\node_modules\\npm\\bin\\npm-cli.js" "install" "phantomjs"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE

npm ERR! phantomjs@1.9.18 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs@1.9.18 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls phantomjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\server\nodejs\npm-debug.log

nodemon(和 node)命令作用於文件夾 C:\\server\\nodejs。 其他軟件包安裝在這里並最終位於子文件夾中:C:\\server\\nodejs\\node_modules。 看起來包正在嘗試運行“node install.js”但目錄錯誤..

似乎我一直在閱讀我能找到的所有內容,但幾天后我不得不問:有人知道發生了什么嗎?

注意:有一個叫做phantomjs的包和一個叫做phantom的包。 沒有相同的包。 主要的 phantomjs 就是 phantomjs 包。 Phantom 是 phantomjs 的包裝器,它創建了一個橋梁(簡單地說:使 phantomjs 與 nodejs 一起工作)。 我安裝了 phantom 以為我在使用 phantomjs。 要使用phantom,必須先安裝phantomjs。

暫無
暫無

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

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