当前位置 : 主页 > 网页制作 > Nodejs >

node.js – 尝试从github而不是从npmjs下载的npm

来源:互联网 收集:自由互联 发布时间:2021-06-16
我有一个看起来像这样的package.json文件: { "name": "MyApp", "version": "1.0.0", "private": true, "scripts": { "start": "node Index.js" }, "dependencies": { "async": "=0.9.0", "body-parser": "=1.12.0", "connect": "=2.23.0", "co
我有一个看起来像这样的package.json文件:

{
  "name": "MyApp",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "start": "node Index.js"
  },
  "dependencies": {
    "async": ">=0.9.0",
    "body-parser": ">=1.12.0",
    "connect": ">=2.23.0",
    "cookie-parser": ">=1.3.4",
    "dequeue": ">=1.0.5",
    "errorhandler": ">=1.3.4",
    "express": ">=4.12.0",
    "express-session": ">=1.10.3",
    "extend": ">=1.3.0",
    "glob": ">=4.0.4",
    "graceful-fs": ">=3.0.2",
    "method-override": ">=2.3.1",
    "mkdirp": ">=0.5.0",
    "morgan": ">=1.5.1",
    "multer": ">=0.1.8",
    "nodemailer": ">=1.3.1",
    "nodemailer-smtp-transport": ">=1.0.0",
    "serve-favicon": ">=2.2.0",
    "serve-static": ">=1.9.1",
    "socket.io": ">=1.3.4",
    "underscore": ">=1.6.0",
    "underscore.string": ">=2.3.3",
    "xml2js": ">=0.4.4"
  }
}

当我在该文件夹中运行“npm install”时,除了一次下载外,它运行顺利:

npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz

这是从“http://registry.npmjs.org”好的,所以我不知道为什么它正在寻找“https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz”:(

通常“https”在此服务器上被阻止而不是“http”,所以我认为它阻止了“https”……关于如何从“http://github”下载它的任何想法?

这是日志:

[root@localhost Temp]# npm install
npm http GET http://registry.npmjs.org/dequeue
npm http GET http://registry.npmjs.org/cookie-parser
npm http GET http://registry.npmjs.org/connect
npm http GET http://registry.npmjs.org/graceful-fs
npm http GET http://registry.npmjs.org/method-override
npm http GET http://registry.npmjs.org/mkdirp
npm http GET http://registry.npmjs.org/morgan
npm http GET http://registry.npmjs.org/multer
npm http GET http://registry.npmjs.org/errorhandler
npm http GET http://registry.npmjs.org/express-session
npm http GET http://registry.npmjs.org/extend
npm http GET http://registry.npmjs.org/express
npm http GET http://registry.npmjs.org/serve-favicon
...
...
npm http GET http://registry.npmjs.org/better-assert
npm http GET http://registry.npmjs.org/options
npm http GET http://registry.npmjs.org/nan
npm http GET http://registry.npmjs.org/ultron
npm http 200 http://registry.npmjs.org/arraybuffer.slice/0.0.6
npm http 200 http://registry.npmjs.org/blob/0.0.2
npm http GET http://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz
npm http GET http://registry.npmjs.org/blob/-/blob-0.0.2.tgz
npm http GET https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
npm http GET http://registry.npmjs.org/has-cors/1.0.3
npm http GET http://registry.npmjs.org/ws/0.4.31
npm http GET http://registry.npmjs.org/debug/1.0.4
npm http GET http://registry.npmjs.org/parseuri/0.0.4
npm http GET http://registry.npmjs.org/parsejson/0.0.1
npm http GET http://registry.npmjs.org/parseqs/0.0.2
npm http GET http://registry.npmjs.org/component-inherit/0.0.3
npm http 200 http://registry.npmjs.org/has-binary/0.1.5
npm http GET http://registry.npmjs.org/has-binary/-/has-binary-0.1.5.tgz
npm http 200 http://registry.npmjs.org/better-assert
npm http 200 http://registry.npmjs.org/utf8/2.0.0
npm http GET http://registry.npmjs.org/utf8/-/utf8-2.0.0.tgz
npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
npm http GET http://registry.npmjs.org/callsite/1.0.0
npm http 200 http://registry.npmjs.org/options
npm http 200 http://registry.npmjs.org/after/0.8.1
npm http GET http://registry.npmjs.org/after/-/after-0.8.1.tgz
npm http 200 http://registry.npmjs.org/base64-arraybuffer/0.1.2
npm http 200 http://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz
npm http GET http://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz
npm http 200 http://registry.npmjs.org/ultron
npm http 200 http://registry.npmjs.org/blob/-/blob-0.0.2.tgz
npm http 200 http://registry.npmjs.org/debug/1.0.4
npm http GET http://registry.npmjs.org/debug/-/debug-1.0.4.tgz
npm http 200 http://registry.npmjs.org/parseuri/0.0.4
npm http GET http://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz
npm http 200 http://registry.npmjs.org/ws/0.4.31
npm http GET http://registry.npmjs.org/ws/-/ws-0.4.31.tgz
npm http 200 http://registry.npmjs.org/has-cors/1.0.3
npm http GET http://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz
npm http 200 http://registry.npmjs.org/parsejson/0.0.1
npm http GET http://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz
npm http 200 http://registry.npmjs.org/has-binary/-/has-binary-0.1.5.tgz
npm http 200 http://registry.npmjs.org/parseqs/0.0.2
npm http GET http://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz
npm http 200 http://registry.npmjs.org/utf8/-/utf8-2.0.0.tgz
npm http 200 http://registry.npmjs.org/component-inherit/0.0.3
npm http GET http://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz
npm http 200 http://registry.npmjs.org/after/-/after-0.8.1.tgz
npm http 200 http://registry.npmjs.org/nan
npm http 200 http://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz
npm http 200 http://registry.npmjs.org/callsite/1.0.0
npm http GET http://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz
npm http 200 http://registry.npmjs.org/debug/-/debug-1.0.4.tgz
npm http 200 http://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz
npm http 200 http://registry.npmjs.org/ws/-/ws-0.4.31.tgz
npm http 200 http://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz
npm http 200 http://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz
npm http 200 http://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz
npm http 200 http://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz
npm http 200 http://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz
npm http GET https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
npm http GET https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
npm ERR! network tunneling socket could not be established, cause=Parse Error
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! System Linux 3.14.4-200.fc20.x86_64
npm ERR! command "node" "/bin/npm" "install"
npm ERR! cwd /home/simulations/GUIServer/Temp
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.3.6
npm ERR! code ECONNRESET
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/simulations/GUIServer/Temp/npm-debug.log
npm ERR! not ok code 0

谢谢!

这是因为您的一个依赖项正在使用github依赖项.
网友评论