ModJS icon indicating copy to clipboard operation
ModJS copied to clipboard

Loading external modules when running in docker

Open theoephraim opened this issue 3 years ago • 1 comments

I couldn't quite figure out how to get external modules to load when running the docker image. It says in the docs "Note that require() will search for modules starting from the working directory of Redis or KeyDB"

  • Specifically within the docker image, which directory is that?
  • Should I map a folder of node_modules with my modules in it to that location? or the module (ex: lodash) folder itself?

Thanks so much!

theoephraim avatar Oct 31 '20 00:10 theoephraim

On a related note, I also am unable to load other local files in the same directory - ie breaking up my script into a few files and loading something like require('./helpers.js')

theoephraim avatar Nov 03 '20 15:11 theoephraim