安装角度2时出错

时间:2016-02-22 09:22:59

标签: npm angular

每当我尝试在桌面上安装角度2时,我都会收到此错误

244 error node v4.3.1
245 error npm  v2.14.12
246 error code ENOTFOUND
247 error errno ENOTFOUND
248 error syscall getaddrinfo
249 error network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:80
249 error network This is most likely not a problem with npm itself
249 error network and is related to network connectivity.
249 error network In most cases you are behind a proxy or have bad network settings.
249 error network
249 error network If you are behind a proxy, please make sure that the
249 error network 'proxy' config is set properly.  See: 'npm help config'
250 verbose exit [ 1, true ]

我发现它与我尝试配置它的代理相关但它不起作用?

这是我的package.json:

{
  "name": "angular2-quickstart",
  "version": "1.0.0",
  "scripts": {
    "postinstall": "npm run typings install",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "start": "concurrent \"npm run tsc:w\" \"npm run lite\" ",
    "typings" : "typings"
  },
  "license": "ISC",
  "dependencies": {
    "angular2": "2.0.0-beta.6",
    "systemjs": "0.19.20",
    "es6-promise": "^3.0.2",
    "es6-shim": "^0.33.3",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.0",
    "zone.js": "0.5.14"
  },
  "devDependencies": {
    "concurrently": "^1.0.0",
    "lite-server": "^2.0.1",
    "typescript": "^1.7.5",
    "typings":"^0.6.8"
  }
}

1 个答案:

答案 0 :(得分:0)

我在.npmrc文件中为npm设置相同的参数并且它的工作

registry =" http://registry.npmjs.org/" strict-ssl = false proxy =" http:// username:passwordproxy:port" https-proxy = " https://开头的用户名:passwordproxy:端口"