从 GitHub 提取模块并按照说明进行构建后,我尝试使用以下方法将其拖入现有项目:
> npm install ../faye
这似乎可以解决问题:
> npm list
/home/dave/src/server
└─┬ [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
但是 Node.js 找不到模块:
> node app.js
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'faye'
at Function._resolveFilename (module.js:334:11)
at Function._load (module.js:279:25)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object.<anonymous> (/home/dave/src/server/app.js:2:12)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
我真的很想了解这里发生了什么,但是我对接下来的去向有些困惑。有什么建议么?