diff --git a/lib/findPlugins.js b/lib/findPlugins.js index 7f96894..b1506d4 100644 --- a/lib/findPlugins.js +++ b/lib/findPlugins.js @@ -32,7 +32,7 @@ module.exports = (cwd, searchDir = 'node_modules') => { // Search relative to every directory in $NODE_PATH. const root = cp.execSync('npm root').toString().trim(); - const globalRoot = cp.execSync('npm root').toString().trim(); + const globalRoot = cp.execSync('npm root -g').toString().trim(); const defaultRoots = `${root}:${globalRoot}`; (process.env.NODE_PATH || defaultRoots).split(':').forEach(cwd =>