revelrylabs / elixir-nodejs

An Elixir API for calling Node.js functions
MIT License
217 stars 31 forks source link

Update NODE_PATH with additional directory paths #30

Closed oohnoitz closed 5 years ago

oohnoitz commented 5 years ago

This should address what was mentioned in PR #12 without any BREAKING CHANGES :crossed_fingers:.

The goal of this PR is to achieve the following:

This is done by simply expanding the NODE_PATH we already set by including the /node_modules directory for the path specified. It's a valid workaround and does address some of the limitations around the node_modules directory.

My understanding is that path is considered our "working directory" in which everything would be ran from. It would make sense for us to also include the /node_modules as part of the NODE_PATH lookup if this is true.