Last active
April 18, 2016 12:12
-
-
Save kkroesch/04652fb6c63f5ca2c100fe4cf2472f91 to your computer and use it in GitHub Desktop.
Failsafe setting of NODE_PATH in scripts. Put this line before importing your own modules to avoid statements like `require('../../middleware')'.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.env.NODE_PATH || (process.env.NODE_PATH = __dirname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment