我正在尝试安装 express,但无法通过此“tobi-cookie”错误。
几天前我通过npm安装了 Connect ,它说它缺少 tobi-cookie。
然后我安装了 tobi-cookie。
今天我试图安装 Express,并得到了这个:
[root@dsusim:/home/GUIServer]$ npm info express version
npm http GET http://registry.npmjs.org/express
npm ERR! TypeError: Cannot read property 'url' of undefined
npm ERR! at new Cookie (/usr/lib/node_modules/tobi-cookie/index.js:46:20)
npm ERR! at addCookie (/usr/lib/node_modules/request/main.js:586:26)
npm ERR! at Array.forEach (native)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/node_modules/request/main.js:590:89)
npm ERR! at ClientRequest.g (events.js:175:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:95:17)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1628:21)
npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:119:23)
npm ERR! at Socket.socketOnData [as ondata] (http.js:1523:20)
npm ERR! at TCP.onread (net.js:510:27)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 3.8.7-201.fc18.x86_64
npm ERR! command "node" "/bin/npm" "info" "express" "version"
npm ERR! cwd /home/GUIServer
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.14
npm ERR! type non_object_property_load
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/GUIServer/npm-debug.log
npm ERR! not ok code 0
然后我继续“npm 卸载”,然后是“npm rm”tobie-cookie。
现在我遇到了大麻烦......无法安装任何东西:
[root@localhost:/usr/lib]$ npm info express version
module.js:340
throw err;
^
Error: Cannot find module 'tobi-cookie'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/lib/node_modules/request/main.js:26:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
.
[root@localhost:/usr/lib]$ npm install tobi-cookie
module.js:340
throw err;
^
Error: Cannot find module 'tobi-cookie'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/lib/node_modules/request/main.js:26:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
.
[root@localhost:/usr/lib]$ npm install tobi-cookie -g
module.js:340
throw err;
^
Error: Cannot find module 'tobi-cookie'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/lib/node_modules/request/main.js:26:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
.
[root@localhost:/usr/lib]$ ls /usr/lib/node_modules/
abbrev config-chain fresh lru-cache npmlog read-installed socket.io
ansi connect fstream mime npm-registry-client read-package-json tar
archy connect-master fstream-ignore minimatch once request uid-number
async cookie fstream-npm mkdirp opener retry which
block-stream cookie-signature glob mute-stream osenv rimraf
buffer-crc32 couch-login graceful-fs node-browserify-master pause semver
bytes debug inherits node-gyp promzard send
chmodr delayed-stream ini nopt proto-list session.socket.io
chownr form-data init-package-json npm qs sigmund
combined-stream formidable lockfile npmconf read slide
.
[root@localhost:/home/GUIServer]$ npm update
module.js:340
throw err;
^
Error: Cannot find module 'tobi-cookie'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/lib/node_modules/request/main.js:26:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
.
[root@localhost:/home/GUIServer]$ locate tobi-cookie
/usr/lib/node_modules/tobi-cookie
/usr/lib/node_modules/request/node_modules/tobi-cookie
/usr/share/doc/nodejs-tobi-cookie-0.3.2
/usr/share/doc/nodejs-tobi-cookie-0.3.2/History.md
/usr/share/doc/nodejs-tobi-cookie-0.3.2/Readme.md