How do I get a module that is dependent on another module? For instance:
Project/foo.js Project/nodule_modules/MyModule/node_modules/AnotherModule //dependencie of MyModule
How can I require "AnotherModule" from the foo.js file?
Use in foo.js module:
foo.js
var that = require('./node_modules/MyModule/node_modules/AnotherModule');
See http://nodejs.org/api/modules.html#modules_file_modules
Source: https://habr.com/ru/post/1446887/More articles:How to sort a list by order of listing? - javaHow to add a Close button on the Dynamic WPF Tab Management tab - c #Build GDAL with PDF support on Windows - c ++How to get HWND of one or more hidden windows? - cBinding between two user dependent objects - data-bindingSandbox - javascriptAlternative branching path for the Silex controller provider - pathWhy is javascript paused by long clicking on an Android or iOS device? - javascriptChoosing a Database Log Viewer Utility - loggingSQL aggregation function - functionAll Articles