【问题标题】:Unable to install Angularjs on Windows 7无法在 Windows 7 上安装 Angularjs
【发布时间】:2015-11-13 06:52:32
【问题描述】:

在 Windows 7 上安装 angularjs 时。失败并显示以下消息:

C:\angular.js>npm install
npm ERR! git rev-list -n1 ced17cbe52c1412b2ada53160432a5b681f37cd7: fatal: bad o
bject ced17cbe52c1412b2ada53160432a5b681f37cd7
npm ERR! git rev-list -n1 ced17cbe52c1412b2ada53160432a5b681f37cd7:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true rev-list -n1 ced17cbe52c1412
b2ada53160432a5b681f37cd7
npm ERR! fatal: bad object ced17cbe52c1412b2ada53160432a5b681f37cd7
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

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

致命坏对象的原因是什么?

【问题讨论】:

    标签: angularjs node.js git


    【解决方案1】:

    如果您在 webstorm 之类的 IDE 的控制台窗口内使用 NPM 安装 angular,例如,您可以尝试使用您的 powershell 安装它,我认为这应该可以解决此错误。

    【讨论】:

    • 感谢您的意见。我尝试使用 Powershell 没有更改相同的错误消息。 npm debug.log 文件包含以下(几行)3357 verbose etag registry.npmjs.org/dgeni-packages from cache 3361 verbose afterAdd C:\Users\002812\AppData\Roaming\npm-cache\dgeni-packages\0.10.17\package\package。 json 写入 3362 详细堆栈错误:命令失败:git -c core.longpaths=true rev-list -n1 ced17cbe52c1412b2ada53160432a5b681f37cd7 3362 详细堆栈致命:坏对象 ced17cbe52c1412b2ada53160432a5b681f37cd7
    • 你的 git 在你的应用程序之外还能工作吗? (您可以通过在不同的文件夹中执行 git init 来测试)
    • 是的 git 工作正常 C:\angular.js>git init 重新初始化 C:/angular.js/.git/ 中的现有 Git 存储库
    • 已解决!问题在于 angularjs package.json 文件中提到的 devDependencies“grunt-jasmine-node”。将其从“grunt-jasmine-node”:“git://github.com/vojtajina/grunt-jasmine-node.git#fix-grunt-exit-code”更改为“grunt-jasmine-node”:“~2.0 .1"
    【解决方案2】:

    已解决!

    问题在于 angularjs package.json 文件中提到的 devDependencies “grunt-jasmine-node”。

    将其从“grunt-jasmine-node”:“git://github.com/vojtajina/grunt-jasmine-node.git#fix-grunt-exit-code”更改为“grunt-jasmine-node”: “~2.0.1”

    grunt-jasmine-node 是对致命对象的引用

    【讨论】:

      猜你喜欢
      • 2020-03-17
      • 2012-11-25
      • 2013-03-02
      • 1970-01-01
      • 1970-01-01
      • 2013-03-15
      • 2014-09-04
      • 2011-07-19
      • 2013-02-12
      相关资源
      最近更新 更多