NodeJS需要在另一个模块内的模块
我怎样才能要求一个模块是另一个模块的依赖关系? 例如:
Project/foo.js Project/nodule_modules/MyModule/node_modules/AnotherModule //dependencie of MyModule
如何从foo.js文件中需要“AnotherModule”?
在foo.js
模块中使用:
var that = require('./node_modules/MyModule/node_modules/AnotherModule');