由于 the way Node.js loads modules , node_modules 可以位于源代码路径中的任何位置。例如,把你的消息来源放在 /worker/src 还有你的 package.json 在里面 /worker 所以 /worker/node_modules 是安装它们的地方。
node_modules
/worker/src
package.json
/worker
/worker/node_modules