简体   繁体   English

PhantomJS 的 npm 安装挂了

[英]Npm install of PhantomJS hangs up

Any time I've tried to install a package.json via npm that contains phantomJS, or a package that uses it as a dependency, the installation hangs up on the phantomJS install.任何时候我尝试通过包含 phantomJS 的 npm 或使用它作为依赖项的包安装 package.json 时,安装都会挂在 phantomJS 安装上。 Haven't a clue what would cause this, any ideas?不知道是什么导致了这种情况,有什么想法吗?

>$ npm install
|
> phantomjs@1.9.7-10 install c:\Users\user\application\node_modules\grunt-mo
cha\node_modules\grunt-lib-phantomjs\node_modules\phantomjs
> node install.js
\

It just stays there indefinitely (with the last slash spinning)它只是无限期地停留在那里(最后一个斜线旋转)

The verbose output:详细输出:

    npm info install sntp@0.2.4 into c:\Users\Nick\extensionTest\node_modules\phan
    tomjs\node_modules\request\node_modules\hawk
    npm info install cryptiles@0.2.2 into c:\Users\Nick\extensionTest\node_modules
    \phantomjs\node_modules\request\node_modules\hawk
    npm info install boom@0.4.2 into c:\Users\Nick\extensionTest\node_modules\phan
    tomjs\node_modules\request\node_modules\hawk
    npm info installOne hoek@0.9.1
    npm info installOne sntp@0.2.4
    npm info installOne cryptiles@0.2.2
    npm info installOne boom@0.4.2
    npm info c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules\reque
    st\node_modules\hawk\node_modules\hoek unbuild
    npm info c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules\reque
    st\node_modules\hawk\node_modules\sntp unbuild
    npm info c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules\reque
    st\node_modules\hawk\node_modules\cryptiles unbuild
    npm info c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules\reque
    st\node_modules\hawk\node_modules\boom unbuild
    npm verb tar unpack C:\Users\Nick\AppData\Roaming\npm-cache\hoek\0.9.1\packa
    ge.tgz
    npm verb lock tar://c:\Users\Nick\extensionTest\node_modules\phantomjs\node_mo
    dules\request\node_modules\hawk\node_modules\hoek C:\Users\Nick\AppData\Roam
    ing\npm-cache\863dbeb6-e-modules-hawk-node-modules-hoek.lock
    npm verb lock tar://C:\Users\Nick\AppData\Roaming\npm-cache\hoek\0.9.1\packa
    ge.tgz C:\Users\Nick\AppData\Roaming\npm-cache\50375b14-npm-cache-hoek-0-9-1
    -package-tgz.lock
    npm verb tar unpack C:\Users\Nick\AppData\Roaming\npm-cache\sntp\0.2.4\packa
    ge.tgz
    npm verb lock tar://c:\Users\Nick\extensionTest\node_modules\phantomjs\node_mo
    dules\request\node_modules\hawk\node_modules\sntp C:\Users\Nick\AppData\Roam
    ing\npm-cache\8fd8d464-e-modules-hawk-node-modules-sntp.lock
    npm verb lock tar://C:\Users\Nick\AppData\Roaming\npm-cache\sntp\0.2.4\packa
    ge.tgz C:\Users\Nick\AppData\Roaming\npm-cache\8e173eaf-npm-cache-sntp-0-2-4
    -package-tgz.lock
    npm verb tar unpack C:\Users\Nick\AppData\Roaming\npm-cache\cryptiles\0.2.2\
    package.tgz
    npm verb lock tar://c:\Users\Nick\extensionTest\node_modules\phantomjs\node_mo
    dules\request\node_modules\hawk\node_modules\cryptiles C:\Users\Nick\AppData
    \Roaming\npm-cache\ea16e82e-ules-hawk-node-modules-cryptiles.lock
    npm verb lock tar://C:\Users\Nick\AppData\Roaming\npm-cache\cryptiles\0.2.2\
    package.tgz C:\Users\Nick\AppData\Roaming\npm-cache\46f6a6ad-ache-cryptiles-
    0-2-2-package-tgz.lock
    npm verb tar unpack C:\Users\Nick\AppData\Roaming\npm-cache\boom\0.4.2\packa
    ge.tgz
    npm verb lock tar://c:\Users\Nick\extensionTest\node_modules\phantomjs\node_mo
    dules\request\node_modules\hawk\node_modules\boom C:\Users\Nick\AppData\Roam
    ing\npm-cache\12a79658-e-modules-hawk-node-modules-boom.lock
    npm verb lock tar://C:\Users\Nick\AppData\Roaming\npm-cache\boom\0.4.2\packa
    ge.tgz C:\Users\Nick\AppData\Roaming\npm-cache\9ddfd014-npm-cache-boom-0-4-2
    -package-tgz.lock
    npm info preinstall cryptiles@0.2.2
    npm info preinstall ctype@0.5.2
    npm verb readDependencies using package.json deps
    npm verb readDependencies using package.json deps
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\hawk\node_modules\cryptiles
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\hawk\node_modules\cryptiles
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules\\hawk\\node_modules' ]
    npm info linkStuff cryptiles@0.2.2
    npm verb linkBins cryptiles@0.2.2
    npm verb linkMans cryptiles@0.2.2
    npm verb rebuildBundles cryptiles@0.2.2
    npm info install cryptiles@0.2.2
    npm verb readDependencies using package.json deps
    npm verb readDependencies using package.json deps
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\http-signature\node_modules\ctype
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\http-signature\node_modules\ctype
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules\\http-signature\\node_modules' ]
    npm info linkStuff ctype@0.5.2
    npm verb linkBins ctype@0.5.2
    npm verb linkMans ctype@0.5.2
    npm verb rebuildBundles ctype@0.5.2
    npm info postinstall cryptiles@0.2.2
    npm info install ctype@0.5.2
    npm info preinstall sntp@0.2.4
    npm info postinstall ctype@0.5.2
    npm info preinstall boom@0.4.2
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\http-signature
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\http-signature
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules' ]
    npm info linkStuff http-signature@0.10.0
    npm verb linkBins http-signature@0.10.0
    npm verb linkMans http-signature@0.10.0
    npm verb rebuildBundles http-signature@0.10.0
    npm verb readDependencies using package.json deps
    npm verb rebuildBundles [ 'asn1', 'assert-plus', 'ctype' ]
    npm info install http-signature@0.10.0
    npm verb readDependencies using package.json deps
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\hawk\node_modules\sntp
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\hawk\node_modules\sntp
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules\\hawk\\node_modules' ]
    npm info linkStuff sntp@0.2.4
    npm verb linkBins sntp@0.2.4
    npm verb linkMans sntp@0.2.4
    npm verb rebuildBundles sntp@0.2.4
    npm info install sntp@0.2.4
    npm verb readDependencies using package.json deps
    npm info postinstall http-signature@0.10.0
    npm verb readDependencies using package.json deps
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\hawk\node_modules\boom
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\hawk\node_modules\boom
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules\\hawk\\node_modules' ]
    npm info linkStuff boom@0.4.2
    npm verb linkBins boom@0.4.2
    npm verb linkMans boom@0.4.2
    npm verb rebuildBundles boom@0.4.2
    npm info postinstall sntp@0.2.4
    npm info install boom@0.4.2
    npm info postinstall boom@0.4.2
    npm info preinstall hoek@0.9.1
    npm verb readDependencies using package.json deps
    npm verb readDependencies using package.json deps
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\hawk\node_modules\hoek
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\hawk\node_modules\hoek
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules\\hawk\\node_modules' ]
    npm info linkStuff hoek@0.9.1
    npm verb linkBins hoek@0.9.1
    npm verb linkMans hoek@0.9.1
    npm verb rebuildBundles hoek@0.9.1
    npm info install hoek@0.9.1
    npm info postinstall hoek@0.9.1
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\hawk
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\hawk
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules' ]
    npm info linkStuff hawk@1.0.0
    npm verb linkBins hawk@1.0.0
    npm verb linkMans hawk@1.0.0
    npm verb rebuildBundles hawk@1.0.0
    npm verb rebuildBundles [ 'boom', 'cryptiles', 'hoek', 'sntp' ]
    npm info install hawk@1.0.0
    npm info postinstall hawk@1.0.0
    npm http 304 https://registry.npmjs.org/delayed-stream
    npm verb etag delayed-stream from cache
    npm info install delayed-stream@0.0.5 into c:\Users\Nick\extensionTest\node_mo
    dules\phantomjs\node_modules\request\node_modules\form-data\node_modules\combine
    d-stream
    npm info installOne delayed-stream@0.0.5
    npm info c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules\reque
    st\node_modules\form-data\node_modules\combined-stream\node_modules\delayed-stre
    am unbuild
    npm verb tar unpack C:\Users\Nick\AppData\Roaming\npm-cache\delayed-stream\0
    .0.5\package.tgz
    npm verb lock tar://c:\Users\Nick\extensionTest\node_modules\phantomjs\node_mo
    dules\request\node_modules\form-data\node_modules\combined-stream\node_modules\d
    elayed-stream C:\Users\Nick\AppData\Roaming\npm-cache\d068bb68-ream-node-mod
    ules-delayed-stream.lock
    npm verb lock tar://C:\Users\Nick\AppData\Roaming\npm-cache\delayed-stream\0
    .0.5\package.tgz C:\Users\Nick\AppData\Roaming\npm-cache\916573b0-delayed-st
    ream-0-0-5-package-tgz.lock
    npm info preinstall delayed-stream@0.0.5
    npm verb readDependencies using package.json deps
    npm verb readDependencies using package.json deps
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\form-data\node_modules\combined-stream\node_modul
    es\delayed-stream
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\form-data\node_modules\combined-stream\node_modules\delaye
    d-stream
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules\\form-data\\node_modules\\combined-stream\\
    node_modules' ]
    npm info linkStuff delayed-stream@0.0.5
    npm verb linkBins delayed-stream@0.0.5
    npm verb linkMans delayed-stream@0.0.5
    npm verb rebuildBundles delayed-stream@0.0.5
    npm info install delayed-stream@0.0.5
    npm info postinstall delayed-stream@0.0.5
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\form-data\node_modules\combined-stream
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\form-data\node_modules\combined-stream
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules\\form-data\\node_modules' ]
    npm info linkStuff combined-stream@0.0.5
    npm verb linkBins combined-stream@0.0.5
    npm verb linkMans combined-stream@0.0.5
    npm verb rebuildBundles combined-stream@0.0.5
    npm verb rebuildBundles [ 'delayed-stream' ]
    npm info install combined-stream@0.0.5
    npm info postinstall combined-stream@0.0.5
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request\node_modules\form-data
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request\node_modules\form-data
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules\\request\\node_modules' ]
    npm info linkStuff form-data@0.1.4
    npm verb linkBins form-data@0.1.4
    npm verb linkMans form-data@0.1.4
    npm verb rebuildBundles form-data@0.1.4
    npm verb rebuildBundles [ 'async', 'combined-stream' ]
    npm info install form-data@0.1.4
    npm info postinstall form-data@0.1.4
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs\nod
    e_modules\request
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs\node_modules
    \request
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules\\phantomjs\
    \node_modules' ]
    npm info linkStuff request@2.36.0
    npm verb linkBins request@2.36.0
    npm verb linkMans request@2.36.0
    npm verb rebuildBundles request@2.36.0
    npm verb rebuildBundles [ 'aws-sign2',
    npm verb rebuildBundles   'forever-agent',
    npm verb rebuildBundles   'form-data',
    npm verb rebuildBundles   'hawk',
    npm verb rebuildBundles   'http-signature',
    npm verb rebuildBundles   'json-stringify-safe',
    npm verb rebuildBundles   'mime',
    npm verb rebuildBundles   'node-uuid',
    npm verb rebuildBundles   'oauth-sign',
    npm verb rebuildBundles   'qs',
    npm verb rebuildBundles   'tough-cookie',
    npm verb rebuildBundles   'tunnel-agent' ]
    npm info install request@2.36.0
    npm info postinstall request@2.36.0
    npm verb about to build c:\Users\Nick\extensionTest\node_modules\phantomjs
    npm info build c:\Users\Nick\extensionTest\node_modules\phantomjs
    npm verb linkStuff [ false,
    npm verb linkStuff   false,
    npm verb linkStuff   false,
    npm verb linkStuff   'c:\\Users\\Nick\\extensionTest\\node_modules' ]
    npm info linkStuff phantomjs@1.9.7-10
    npm verb linkBins phantomjs@1.9.7-10
    npm verb link bins [ { phantomjs: './bin/phantomjs' },
    npm verb link bins   'c:\\Users\\Nick\\extensionTest\\node_modules\\.bin',
    npm verb link bins   false ]
    npm verb linkMans phantomjs@1.9.7-10
    npm verb rebuildBundles phantomjs@1.9.7-10
    npm verb rebuildBundles [ '.bin',
    npm verb rebuildBundles   'adm-zip',
    npm verb rebuildBundles   'kew',
    npm verb rebuildBundles   'mkdirp',
    npm verb rebuildBundles   'ncp',
    npm verb rebuildBundles   'npmconf',
    npm verb rebuildBundles   'request',
    npm verb rebuildBundles   'rimraf',
    npm verb rebuildBundles   'which' ]
    npm info install phantomjs@1.9.7-10


    > phantomjs@1.9.7-10 install c:\Users\Nick\extensionTest\node_modules\phantomj
    s
    > node install.js

    \

I had this problem as well on my Windows 7 box.我的 Windows 7 机器上也有这个问题。 I solved it by uninstalling my existing installation of PhantomJS and removing the reference to it from the PATH variable.我通过卸载我现有的 PhantomJS 安装并从 PATH 变量中删除对它的引用来解决它。 Then I cleaned my npm cache (npm cache clean) and ran npm install again.然后我清理了我的 npm 缓存(npm 缓存清理)并再次运行 npm install。 This time the npm install operation completed successfully.这次 npm install 操作成功完成。

我通过运行解决了这个问题

npm cache verify

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

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