我是否只需要在父级应用程序中同时包含猫鼬作为依赖项,还是可以通过子级方式访问该模块?
尽管 可能
,例如
require('github/node_modules/mongoose'),标准做法是显式安装所有依赖项(即,应将mongoose包括为应用程序的依赖项)和require('mongoose')。
我是否只需要在父级应用程序中同时包含猫鼬作为依赖项,还是可以通过子级方式访问该模块?
尽管 可能
,例如
require('github/node_modules/mongoose'),标准做法是显式安装所有依赖项(即,应将mongoose包括为应用程序的依赖项)和require('mongoose')。