【问题标题】:Error during MEAN stack installation - phantomjsMEAN堆栈安装期间出错 - phantomjs
【发布时间】:2016-01-12 07:49:21
【问题描述】:
C:\Users\Dell\mriob>npm install
npm WARN package.json mean@0.5.5 No license field.
/
> phantomjs@1.9.18 install C:\Users\Dell\mriob\node_modules\phantomjs
> node install.js

Looks like an `npm install -g` on windows; unable to check for already installed version.
Download already available at C:\Users\Dell\AppData\Local\Temp\phantomjs\phantom
js-1.9.8-windows.zip
Extracting zip contents
Error extracting zip
Phantom installation failed Invalid or unsupported zip format. No END header found undefined

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
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:\Users\Dell\mriob\npm-debug.log

我尝试使用“npm install -g phantomjs”安装 phantomjs。这完美地发生了。但是,当我在 MEAN 堆栈文件夹“mriob”中运行“npm install”时,出现此错误。

我尝试在 temp 中删除 phantomjs zip 文件,然后运行“npm install”。同样的错误。

【问题讨论】:

    标签: node.js phantomjs mean


    【解决方案1】:

    尝试将您的 npm 版本 (v2.14.7) 升级到最新 (v3.3.8)

    在 Windows 上升级 npm

    以管理员身份运行 PowerShell/CMD

    执行脚本

    Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
    

    然后运行

    npm install -g npm-windows-upgrade
    npm-windows-upgrade
    

    选择列表中的最后一个 npm 版本(今天是 v3.3.8)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-19
      • 2013-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-14
      • 2017-06-18
      • 1970-01-01
      相关资源
      最近更新 更多