grunt 一直getaddrinfo ENOTFOUND

Yangff
  • 1.5k

导致的结果大概是这样的。
在编译atom
alias npm=‘cnpm’也不行。
修改.npmrc也不行
是不是我要自己写一个npm换掉bin下面的?

-update-

好像也不是源的问题……我把它放到mbox里面执行也这样子。。
就是各种getaddrinfo ENOTFOUND,换源、换代理、ssh都试过了。

-update2-

以及在root下执行node 就

node.js:811
    var cwd = process.cwd();
                      ^
Error: ENOENT, no such file or directory
    at Function.startup.resolveArgv0 (node.js:811:23)
    at startup (node.js:58:13)
    at node.js:902:3

之所以用root是因为yaourt在root下可以重用之前git clone下来的东西……我已经折腾这个一天了。。下载速度是在恶心。。

300 verbose url resolved https://registry.npmjs.org/github-releases
301 info trying registry request attempt 1 at 17:52:14
302 http GET https://registry.npmjs.org/github-releases
303 verbose url raw fs-plus
304 verbose url resolving [ 'https://registry.npmjs.org/', './fs-plus' ]
305 verbose url resolved https://registry.npmjs.org/fs-plus
306 info trying registry request attempt 1 at 17:52:14
307 http GET https://registry.npmjs.org/fs-plus
308 verbose addRemoteGit [ 'git://github.com/atom/grunt-coffeelint.git', 'master' ]
309 silly addNameRange { name: 'grunt-contrib-coffee',
309 silly addNameRange   range: '>=0.9.0-0 <0.10.0-0',
309 silly addNameRange   hasData: false }
310 silly addNameRange { name: 'grunt-contrib-less',
310 silly addNameRange   range: '>=0.8.0-0 <0.9.0-0',
310 silly addNameRange   hasData: false }
311 silly addNameRange { name: 'grunt-download-atom-shell',
311 silly addNameRange   range: '>=0.7.0-0 <0.8.0-0',
311 silly addNameRange   hasData: false }
312 silly addNameRange { name: 'grunt-markdown',
312 silly addNameRange   range: '>=0.4.0-0 <0.5.0-0',
312 silly addNameRange   hasData: false }
313 silly addNameRange { name: 'grunt-peg',
313 silly addNameRange   range: '>=1.1.0-0 <1.2.0-0',
313 silly addNameRange   hasData: false }
314 silly addNameRange { name: 'grunt-shell',
314 silly addNameRange   range: '>=0.3.1-0 <0.4.0-0',
314 silly addNameRange   hasData: false }
315 verbose url raw grunt
316 verbose url resolving [ 'https://registry.npmjs.org/', './grunt' ]
317 verbose url resolved https://registry.npmjs.org/grunt
318 info trying registry request attempt 1 at 17:52:14
319 http GET https://registry.npmjs.org/grunt
320 verbose url raw formidable
321 verbose url resolving [ 'https://registry.npmjs.org/', './formidable' ]
322 verbose url resolved https://registry.npmjs.org/formidable
323 info trying registry request attempt 1 at 17:52:14
324 http GET https://registry.npmjs.org/formidable
325 verbose url raw grunt-contrib-csslint
326 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-contrib-csslint' ]
327 verbose url resolved https://registry.npmjs.org/grunt-contrib-csslint
328 info trying registry request attempt 1 at 17:52:14
329 http GET https://registry.npmjs.org/grunt-contrib-csslint
330 verbose url raw biscotto
331 verbose url resolving [ 'https://registry.npmjs.org/', './biscotto' ]
332 verbose url resolved https://registry.npmjs.org/biscotto
333 info trying registry request attempt 1 at 17:52:14
334 http GET https://registry.npmjs.org/biscotto
335 silly addNameRange { name: 'harmony-collections',
335 silly addNameRange   range: '>=0.3.8-0 <0.4.0-0',
335 silly addNameRange   hasData: false }
336 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
337 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
338 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
339 verbose url raw grunt-contrib-coffee
340 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-contrib-coffee' ]
341 verbose url resolved https://registry.npmjs.org/grunt-contrib-coffee
342 info trying registry request attempt 1 at 17:52:14
343 http GET https://registry.npmjs.org/grunt-contrib-coffee
344 verbose url raw grunt-contrib-less
345 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-contrib-less' ]
346 verbose url resolved https://registry.npmjs.org/grunt-contrib-less
347 info trying registry request attempt 1 at 17:52:14
348 http GET https://registry.npmjs.org/grunt-contrib-less
349 verbose url raw grunt-cson
350 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-cson' ]
351 verbose url resolved https://registry.npmjs.org/grunt-cson
352 info trying registry request attempt 1 at 17:52:14
353 http GET https://registry.npmjs.org/grunt-cson
354 verbose url raw grunt-download-atom-shell
355 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-download-atom-shell' ]
356 verbose url resolved https://registry.npmjs.org/grunt-download-atom-shell
357 info trying registry request attempt 1 at 17:52:14
358 http GET https://registry.npmjs.org/grunt-download-atom-shell
359 verbose url raw grunt-lesslint
360 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-lesslint' ]
361 verbose url resolved https://registry.npmjs.org/grunt-lesslint
362 info trying registry request attempt 1 at 17:52:14
363 http GET https://registry.npmjs.org/grunt-lesslint
364 verbose url raw grunt-markdown
365 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-markdown' ]
366 verbose url resolved https://registry.npmjs.org/grunt-markdown
367 info trying registry request attempt 1 at 17:52:14
368 http GET https://registry.npmjs.org/grunt-markdown
369 verbose url raw grunt-peg
370 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-peg' ]
371 verbose url resolved https://registry.npmjs.org/grunt-peg
372 info trying registry request attempt 1 at 17:52:14
373 http GET https://registry.npmjs.org/grunt-peg
374 verbose url raw grunt-shell
375 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-shell' ]
376 verbose url resolved https://registry.npmjs.org/grunt-shell
377 info trying registry request attempt 1 at 17:52:14
378 http GET https://registry.npmjs.org/grunt-shell
379 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
380 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
381 silly addNameRange { name: 'legal-eagle',
381 silly addNameRange   range: '>=0.4.0-0 <0.5.0-0',
381 silly addNameRange   hasData: false }
382 silly addNameRange { name: 'json-front-matter',
382 silly addNameRange   range: '>=0.1.3-0 <0.2.0-0',
382 silly addNameRange   hasData: false }
383 silly addNameRange { name: 'minidump', range: '>=0.5.0-0 <0.6.0-0', hasData: false }
384 silly addNameRange { name: 'request',
384 silly addNameRange   range: '>=2.27.0-0 <2.28.0-0',
384 silly addNameRange   hasData: false }
385 silly addNameRange { name: 'rimraf', range: '>=2.2.2-0 <2.3.0-0', hasData: false }
386 silly addNameRange { name: 'runas', range: '>=0.5.0-0 <0.6.0-0', hasData: false }
387 silly addNameRange { name: 'underscore-plus',
387 silly addNameRange   range: '>=1.0.0-0 <2.0.0-0',
387 silly addNameRange   hasData: false }
388 silly addNameRange { name: 'unzip', range: '>=0.1.9-0 <0.2.0-0', hasData: false }
389 silly addNameRange { name: 'vm-compatibility-layer',
389 silly addNameRange   range: '>=0.1.0-0 <0.2.0-0',
389 silly addNameRange   hasData: false }
390 silly addNameRange { name: 'npm', range: '>=1.4.5-0 <1.5.0-0', hasData: false }
391 verbose url raw harmony-collections
392 verbose url resolving [ 'https://registry.npmjs.org/', './harmony-collections' ]
393 verbose url resolved https://registry.npmjs.org/harmony-collections
394 info trying registry request attempt 1 at 17:52:14
395 http GET https://registry.npmjs.org/harmony-collections
396 silly addNameRange { name: 'rcedit', range: '>=0.1.2-0 <0.2.0-0', hasData: false }
397 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
398 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
399 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
400 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
401 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
402 verbose url raw legal-eagle
403 verbose url resolving [ 'https://registry.npmjs.org/', './legal-eagle' ]
404 verbose url resolved https://registry.npmjs.org/legal-eagle
405 info trying registry request attempt 1 at 17:52:14
406 http GET https://registry.npmjs.org/legal-eagle
407 verbose url raw json-front-matter
408 verbose url resolving [ 'https://registry.npmjs.org/', './json-front-matter' ]
409 verbose url resolved https://registry.npmjs.org/json-front-matter
410 info trying registry request attempt 1 at 17:52:14
411 http GET https://registry.npmjs.org/json-front-matter
412 verbose url raw minidump
413 verbose url resolving [ 'https://registry.npmjs.org/', './minidump' ]
414 verbose url resolved https://registry.npmjs.org/minidump
415 info trying registry request attempt 1 at 17:52:14
416 http GET https://registry.npmjs.org/minidump
417 verbose url raw normalize-package-data
418 verbose url resolving [ 'https://registry.npmjs.org/', './normalize-package-data' ]
419 verbose url resolved https://registry.npmjs.org/normalize-package-data
420 info trying registry request attempt 1 at 17:52:14
421 http GET https://registry.npmjs.org/normalize-package-data
422 verbose url raw read-package-json
423 verbose url resolving [ 'https://registry.npmjs.org/', './read-package-json' ]
424 verbose url resolved https://registry.npmjs.org/read-package-json
425 info trying registry request attempt 1 at 17:52:14
426 http GET https://registry.npmjs.org/read-package-json
427 verbose url raw request
428 verbose url resolving [ 'https://registry.npmjs.org/', './request' ]
429 verbose url resolved https://registry.npmjs.org/request
430 info trying registry request attempt 1 at 17:52:14
431 http GET https://registry.npmjs.org/request
432 verbose url raw rimraf
433 verbose url resolving [ 'https://registry.npmjs.org/', './rimraf' ]
434 verbose url resolved https://registry.npmjs.org/rimraf
435 info trying registry request attempt 1 at 17:52:14
436 http GET https://registry.npmjs.org/rimraf
437 verbose url raw runas
438 verbose url resolving [ 'https://registry.npmjs.org/', './runas' ]
439 verbose url resolved https://registry.npmjs.org/runas
440 info trying registry request attempt 1 at 17:52:14
441 http GET https://registry.npmjs.org/runas
442 verbose url raw underscore-plus
443 verbose url resolving [ 'https://registry.npmjs.org/', './underscore-plus' ]
444 verbose url resolved https://registry.npmjs.org/underscore-plus
445 info trying registry request attempt 1 at 17:52:14
446 http GET https://registry.npmjs.org/underscore-plus
447 verbose url raw unzip
448 verbose url resolving [ 'https://registry.npmjs.org/', './unzip' ]
449 verbose url resolved https://registry.npmjs.org/unzip
450 info trying registry request attempt 1 at 17:52:14
451 http GET https://registry.npmjs.org/unzip
452 verbose url raw vm-compatibility-layer
453 verbose url resolving [ 'https://registry.npmjs.org/', './vm-compatibility-layer' ]
454 verbose url resolved https://registry.npmjs.org/vm-compatibility-layer
455 info trying registry request attempt 1 at 17:52:14
456 http GET https://registry.npmjs.org/vm-compatibility-layer
457 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
458 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
459 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
460 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
461 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
462 verbose url raw rcedit
463 verbose url resolving [ 'https://registry.npmjs.org/', './rcedit' ]
464 verbose url resolved https://registry.npmjs.org/rcedit
465 info trying registry request attempt 1 at 17:52:14
466 http GET https://registry.npmjs.org/rcedit
467 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
468 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
469 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
470 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
471 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
472 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
473 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
474 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
475 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
476 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
477 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
478 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
479 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
480 verbose url raw grunt-cli
481 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-cli' ]
482 verbose url resolved https://registry.npmjs.org/grunt-cli
483 info trying registry request attempt 1 at 17:52:14
484 verbose etag "DHJKBBSUTETKAJTDNGKUJOX5K"
485 http GET https://registry.npmjs.org/grunt-cli
486 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
487 verbose url raw npm
488 verbose url resolving [ 'https://registry.npmjs.org/', './npm' ]
489 verbose url resolved https://registry.npmjs.org/npm
490 info trying registry request attempt 1 at 17:52:15
491 verbose etag "1397657987000"
492 http GET https://registry.npmjs.org/npm
493 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
494 error git clone git://github.com/atom/grunt-coffeelint.git 克隆到裸版本库 '/root/.npm/_git-remotes/git-github-com-atom-grunt-coffeelint-git-ae5f2712'...
494 error git clone git://github.com/atom/grunt-coffeelint.git fatal: unable to access 'https://github.com/atom/grunt-coffeelint.git/': Could not resolve host: github.com
495 silly lockFile ae5f2712-ub-com-atom-grunt-coffeelint-git git://github.com/atom/grunt-coffeelint.git
496 silly lockFile ae5f2712-ub-com-atom-grunt-coffeelint-git git://github.com/atom/grunt-coffeelint.git
497 error Error: Command failed: 克隆到裸版本库 '/root/.npm/_git-remotes/git-github-com-atom-grunt-coffeelint-git-ae5f2712'...
497 error fatal: unable to access 'https://github.com/atom/grunt-coffeelint.git/': Could not resolve host: github.com
497 error
497 error     at ChildProcess.exithandler (child_process.js:647:15)
497 error     at ChildProcess.EventEmitter.emit (events.js:98:17)
497 error     at maybeClose (child_process.js:753:16)
497 error     at Socket.<anonymous> (child_process.js:966:11)
497 error     at Socket.EventEmitter.emit (events.js:95:17)
497 error     at Pipe.close (net.js:465:12)
498 error If you need help, you may report this *entire* log,
498 error including the npm and node versions, at:
498 error     <http://github.com/npm/npm/issues>
499 error System Linux 3.14.3-2-ARCH
500 error command "/usr/bin/node" "/usr/bin/npm" "--userconfig=/tmp/yaourt-tmp-p-yangff/aur-atom-editor-git/src/atom/.npmrc" "install"
501 error cwd /tmp/yaourt-tmp-yangff/aur-atom-editor-git/src/atom/build
502 error node -v v0.10.28
503 error npm -v 1.4.9
504 error code 128
505 verbose exit [ 1, true ]

回复
阅读 14.3k
3 个回答

register.npmjs 和 github.com都是墙内啊

不行用ssh翻墙就好

cd $PWD 然后再试试。

宣传栏