From f98d06d21201e3335615d243cd0686f506e86756 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 20 Sep 2013 17:20:01 -0700 Subject: [PATCH] Add node_modules back to NODE_PATH This is required until all packages are migrated to include their dependencies in package.json instead of requiring other modules directly from core. This allows apm linking to still working while packages are migrated. --- src/atom-window.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/atom-window.coffee b/src/atom-window.coffee index 4a68e5ed6..3da832046 100644 --- a/src/atom-window.coffee +++ b/src/atom-window.coffee @@ -42,7 +42,12 @@ class AtomWindow @openPath(pathToOpen, initialLine) setupNodePath: (resourcePath) -> - process.env['NODE_PATH'] = path.resolve(resourcePath, 'exports') + paths = [ + 'exports' + 'node_modules' + ] + paths = paths.map (relativePath) -> path.resolve(resourcePath, relativePath) + process.env['NODE_PATH'] = paths.join path.delimiter getInitialPath: -> @browserWindow.loadSettings.initialPath