diff --git a/lib/build.js b/lib/build.js index 359be2b..0d906e9 100644 --- a/lib/build.js +++ b/lib/build.js @@ -106,11 +106,14 @@ function ensureJavaScriptEngineDownloaded(opts) { function getDependencies(opts) { return Promise.all([ glob('!(node_modules)/', opts), - shellpromise('npm ls --production --parseable --loglevel=silent', opts), + shellpromise('npm ls --production --parseable', opts), glob('*', { dot: true, cwd: opts.cwd, nodir: true }), exists(opts.cwd+'/node_modules/.bin') ]) .then(function(results) { + // Strip out anything that isn't a path e.g. loglevel info output + results[1] = results[1].replace(/^[^\/].+/m, ''); + var nodeModules = results[1].trim().split("\n"); var deps = results[0] .map(function(folder) { return './' + folder; });