在npm-check-updates之后npm安装失败

时间:2017-01-25 19:41:17

标签: node.js npm npm-install package.json

以下package.json的npm install命令失败:

{
  "name": "xxxxxxxxx",
  "version": "0.6.8",
  "description": "xxxxxx",
  "main": "gulpfile.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": ""
  },
  "keywords": [
    "gulp",
    "react",
    "webpack",
    "boilerplate",
    "ES6",
    "ES2015",
    "babel",
    "mocha",
    "hmr",
    "express",
    "sass"
  ],
  "author": "Punkbit",
  "license": "WTFPL",
  "bugs": {
    "url": "xxxxxx"
  },
  "homepage": "xxxxxx",
  "devDependencies": {
    "babel-core": "^6.13.2",
    "babel-eslint": "^7.1.1",
    "babel-loader": "^6.2.5",
    "babel-preset-es2015": "^6.13.2",
    "babel-preset-react": "^6.11.1",
    "chai": "^3.5.0",
    "chalk": "^1.1.3",
    "cheerio": "^0.22.0",
    "compression-webpack-plugin": "^0.3.2",
    "css-loader": "^0.26.1",
    "enzyme": "^2.4.1",
    "extract-text-webpack-plugin": "^1.0.1",
    "figlet": "^1.2.0",
    "file-loader": "^0.9.0",
    "gulp": "^3.9.1",
    "gulp-clean": "^0.3.2",
    "gulp-git": "^1.12.0",
    "gulp-mocha": "^3.0.1",
    "gulp-plumber": "^1.1.0",
    "gulp-util": "^3.0.7",
    "html-webpack-plugin": "^2.22.0",
    "jsdom": "^9.5.0",
    "lodash": "^4.15.0",
    "mocha": "^3.0.2",
    "mocha-jsdom": "^1.1.0",
    "node-sass": "^4.3.0",
    "open": "0.0.5",
    "popmotion": "^5.0.18",
    "react": "^15.3.1",
    "react-addons-test-utils": "^15.3.1",
    "react-dom": "^15.3.1",
    "react-hot-loader": "^3.0.0-alpha.8",
    "react-redux": "^5.0.2",
    "react-router": "^3.0.2",
    "react-router-redux": "^4.0.5",
    "redux": "^3.5.2",
    "redux-devtools": "^3.3.1",
    "redux-devtools-dock-monitor": "^1.1.1",
    "redux-devtools-log-monitor": "^1.1.1",
    "redux-mock-store": "^1.2.0",
    "redux-thunk": "^2.1.0",
    "sass-loader": "^4.0.0",
    "style-loader": "^0.13.1",
    "testdom": "^2.0.0",
    "webpack": "^1.9.11",
    "webpack-dev-middleware": "^1.9.0",
    "webpack-dev-server": "^1.9.0",
    "webpack-hot-middleware": "^2.15.0",
    "zombie": "^5.0.5"
  },
  "dependencies": {
    "babel-polyfill": "^6.22.0",
    "express": "^4.14.0",
    "superagent": "^3.3.2"
  },
 "engines" : {
    "node" : ">=7.4.0",
    "npm": ">=4.0.5"
  }
}

节点版本为:

node -v
v6.6.0

npm -v
3.30.3

错误日志:

npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/aws4/-/aws4-1.5.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/boolbase/-/boolbase-1.0.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/buffer/-/buffer-4.9.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/code-point-at/-/code-point-at-1.1.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/ws/-/ws-1.1.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/which/-/which-1.2.12.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/tough-cookie/-/tough-cookie-2.3.2.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/repeating/-/repeating-2.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/orchestrator/-/orchestrator-0.3.8.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/function.prototype.name/-/function.prototype.name-1.0.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/domelementtype/-/domelementtype-1.3.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/dom-serializer/-/dom-serializer-0.1.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/entities/-/entities-1.1.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/findup-sync/-/findup-sync-0.4.3.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/domutils/-/domutils-1.5.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/domhandler/-/domhandler-2.3.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/is-absolute/-/is-absolute-0.2.6.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/lodash.assign/-/lodash.assign-4.2.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/nth-check/-/nth-check-1.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/ms/-/ms-0.7.2.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80
npm ERR! fetch failed http://deveng.io/nexus/content/groups/NPM/async/-/async-0.9.2.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.185.1.203:80

在我使用:

更新所有软件包之后,这种情况开始发生了
npm-check-updates

因此,在我最初运行npm-check-updates并更新软件包的机器中不会发生错误。但发生在其他地方。

我想如果我将节点更新到最新版本,在我的情况下通过brew,我应该解决这个问题,但我想了解为什么会失败以及如何检测它以防止将来发生这种情况!

+++ UPDATE +++

所以,我决定运行

brew install nvm

通过nvm

安装了最新的节点版本
nvm install 7.4.0

但问题仍然存在!在我无法复制的机器上,问题有节点7.4.0和npm 4.0.5。所以,我对正在发生的事情一无所知!

1 个答案:

答案 0 :(得分:1)

好的,我有npm-shrinkwrap,这阻止了npm install正常运行!

解决方案是删除npm-shrinkwrap。