在将节点项目移动到新机器之后,Npm - 404 Not Found:'ErrorHandler'

时间:2015-02-13 18:18:31

标签: node.js express npm

我已将nodeJS项目从macbook移动到vagrant virtualbox ubuntu hashicorp / precise32机器。 在我这样做之后,npm install对我来说似乎不起作用。这是输出日志。

如果这是一个愚蠢的问题,我提前道歉,但感谢您的帮助。 控制台输出:

vagrant@precise32:/vagrant$ npm install
npm ERR! 404 404 Not Found: ErrorHandler
npm ERR! 404
npm ERR! 404 'ErrorHandler' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'node'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Linux 3.2.0-23-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /vagrant
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /vagrant/npm-debug.log
npm ERR! not ok code 0

输出日志:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using npm@1.4.28
3 info using node@v0.10.36
4 verbose node symlink /usr/bin/node
5 verbose readDependencies using package.json deps
6 verbose install where, deps [ '/vagrant',
6 verbose install   [ 'ErrorHandler',
6 verbose install     'body-parser',
6 verbose install     'cookie-parser',
6 verbose install     'debug',
6 verbose install     'errorhandler',
6 verbose install     'express',
6 verbose install     'hjs',
6 verbose install     'less-middleware',
6 verbose install     'mongoose',
6 verbose install     'morgan',
6 verbose install     'serve-favicon' ] ]
7 info preinstall node@0.0.0
8 verbose readDependencies using package.json deps
9 verbose already installed skipping less-middleware@1.0.x /vagrant
10 verbose already installed skipping mongoose@^3.8.21 /vagrant
11 verbose already installed skipping morgan@~1.5.1 /vagrant
12 verbose already installed skipping serve-favicon@~2.2.0 /vagrant
13 verbose cache add [ 'ErrorHandler@*', null ]
14 verbose cache add name=undefined spec="ErrorHandler@*" args=["ErrorHandler@*",null]
15 verbose parsed url { protocol: null,
15 verbose parsed url   slashes: null,
15 verbose parsed url   auth: null,
15 verbose parsed url   host: null,
15 verbose parsed url   port: null,
15 verbose parsed url   hostname: null,
15 verbose parsed url   hash: null,
15 verbose parsed url   search: null,
15 verbose parsed url   query: null,
15 verbose parsed url   pathname: 'ErrorHandler@*',
15 verbose parsed url   path: 'ErrorHandler@*',
15 verbose parsed url   href: 'ErrorHandler@*' }
16 verbose cache add name="ErrorHandler" spec="*" args=["ErrorHandler","*"]
17 verbose parsed url { protocol: null,
17 verbose parsed url   slashes: null,
17 verbose parsed url   auth: null,
17 verbose parsed url   host: null,
17 verbose parsed url   port: null,
17 verbose parsed url   hostname: null,
17 verbose parsed url   hash: null,
17 verbose parsed url   search: null,
17 verbose parsed url   query: null,
17 verbose parsed url   pathname: '*',
17 verbose parsed url   path: '*',
17 verbose parsed url   href: '*' }
18 verbose addNamed [ 'ErrorHandler', '*' ]
19 verbose addNamed [ null, '*' ]
20 silly lockFile 65786050-ErrorHandler ErrorHandler@*
21 verbose lock ErrorHandler@* /home/vagrant/.npm/65786050-ErrorHandler.lock
22 silly addNameRange { name: 'ErrorHandler', range: '*', hasData: false }
23 verbose already installed skipping body-parser@~1.10.1 /vagrant
24 verbose request where is /ErrorHandler
25 verbose request registry https://registry.npmjs.org/
26 verbose request id 2dbcfd0dda4d0f87
27 verbose url raw /ErrorHandler
28 verbose url resolving [ 'https://registry.npmjs.org/', './ErrorHandler' ]
29 verbose url resolved https://registry.npmjs.org/ErrorHandler
30 verbose request where is https://registry.npmjs.org/ErrorHandler
31 info trying registry request attempt 1 at 18:11:56
32 http GET https://registry.npmjs.org/ErrorHandler
33 verbose already installed skipping cookie-parser@~1.3.3 /vagrant
34 verbose already installed skipping debug@~2.1.1 /vagrant
35 verbose already installed skipping errorhandler@^1.3.2 /vagrant
36 verbose already installed skipping express@~4.10.6 /vagrant
37 verbose already installed skipping hjs@~0.0.6 /vagrant
38 http 404 https://registry.npmjs.org/ErrorHandler
39 verbose headers { date: 'Fri, 13 Feb 2015 18:11:56 GMT',
39 verbose headers   server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
39 verbose headers   'content-type': 'application/json',
39 verbose headers   'cache-control': 'max-age=0',
39 verbose headers   'content-length': '52',
39 verbose headers   'accept-ranges': 'bytes',
39 verbose headers   via: '1.1 varnish',
39 verbose headers   age: '0',
39 verbose headers   'x-served-by': 'cache-iad2145-IAD',
39 verbose headers   'x-cache': 'MISS',
39 verbose headers   'x-cache-hits': '0',
39 verbose headers   'x-timer': 'S1423851116.130592,VS0,VE55',
39 verbose headers   'keep-alive': 'timeout=10, max=50',
39 verbose headers   connection: 'Keep-Alive' }
40 silly registry.get cb [ 404,
40 silly registry.get   { date: 'Fri, 13 Feb 2015 18:11:56 GMT',
40 silly registry.get     server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
40 silly registry.get     'content-type': 'application/json',
40 silly registry.get     'cache-control': 'max-age=0',
40 silly registry.get     'content-length': '52',
40 silly registry.get     'accept-ranges': 'bytes',
40 silly registry.get     via: '1.1 varnish',
40 silly registry.get     age: '0',
40 silly registry.get     'x-served-by': 'cache-iad2145-IAD',
40 silly registry.get     'x-cache': 'MISS',
40 silly registry.get     'x-cache-hits': '0',
40 silly registry.get     'x-timer': 'S1423851116.130592,VS0,VE55',
40 silly registry.get     'keep-alive': 'timeout=10, max=50',
40 silly registry.get     connection: 'Keep-Alive' } ]
41 silly lockFile 65786050-ErrorHandler ErrorHandler@*
42 silly lockFile 65786050-ErrorHandler ErrorHandler@*
43 error 404 404 Not Found: ErrorHandler
43 error 404
43 error 404 'ErrorHandler' is not in the npm registry.
43 error 404 You should bug the author to publish it
43 error 404 It was specified as a dependency of 'node'
43 error 404
43 error 404 Note that you can also install from a
43 error 404 tarball, folder, or http url, or git url.
44 error System Linux 3.2.0-23-generic-pae
45 error command "/usr/bin/node" "/usr/bin/npm" "install"
46 error cwd /vagrant
47 error node -v v0.10.36
48 error npm -v 1.4.28
49 error code E404
50 verbose exit [ 1, true ]

1 个答案:

答案 0 :(得分:0)

这是因为没有名为ErrorHandler的模块。

也许您自己已将此条目添加到package.json?有一个名为errorhandler tho'的模块,因此请确保您的大小写正确。

同样在将来(如果您还没有这样做)安装带有--save开关的模块,这样它们就会自动添加到您的package.json,并且具有合理的版本限制和正确的模块名。