Popcorn-desktop: Command failed: npm ls --production=true --parseable=true

Created on 17 Jun 2017  路  1Comment  路  Source: popcorn-official/popcorn-desktop

Operating System Version:
Debian 8.8

Popcorn Time Version:
9e25e9f

Download date:
Pulled from Git

Expected Behaviour

gulp build should not return an error.

Actual Behaviour

I get this error when running gulp build:

[22:33:51] Using gulpfile ~/www/popcorn-desktop/gulpfile.js
[22:33:51] Starting 'build'...
[22:33:51] Starting 'injectgit'...
Branch: development
Commit: 9e25e9f0
[22:33:51] Finished 'injectgit' after 11 ms
[22:33:51] Starting 'css'...
Stylus files compiled in /home/pierre/www/popcorn-desktop/src/app/themes/
[22:33:53] Finished 'css' after 2.45 s
[22:33:53] Starting 'nwjs'...
{ [Error: Command failed: npm ls --production=true --parseable=true
npm ERR! invalid: [email protected] /home/pierre/www/popcorn-desktop/node_modules/es3ify/node_modules/esprima-fb
]
  killed: false,
  code: 1,
  signal: null,
  cmd: 'npm ls --production=true --parseable=true' }
[22:33:56] Finished 'nwjs' after 2.15 s
[22:33:56] Finished 'build' after 4.62 s

Steps to reproduce the behaviour

I'm not sure, but I think this is caused by the NPM 5.0 update.

Most helpful comment

Here is a dirty workaround:

diff --git a/gulpfile.js b/gulpfile.js
index a0c5db18..99edb477 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -209,18 +209,11 @@ gulp.task('default', () => {

 // download and compile nwjs
 gulp.task('nwjs', () => {
-    return parseReqDeps().then((requiredDeps) => {
-        // required files
     nw.options.files = ['./src/**', '!./src/app/styl/**', './package.json', './README.md', './CHANGELOG.md', './LICENSE.txt', './.git.json'];
-        // add node_modules
-        nw.options.files = nw.options.files.concat(requiredDeps);
     // remove junk files
     nw.options.files = nw.options.files.concat(['!./node_modules/**/*.bin', '!./node_modules/**/*.c', '!./node_modules/**/*.h', '!./node_modules/**/Makefile', '!./node_modules/**/*.h', '!./**/test*/**', '!./**/doc*/**', '!./**/example*/**', '!./**/demo*/**', '!./**/bin/**', '!./**/build/**', '!./**/.*/**']);

     return nw.build();
-    }).catch(function (error) {
-        console.error(error);
-    });
 });


>All comments

Here is a dirty workaround:

diff --git a/gulpfile.js b/gulpfile.js
index a0c5db18..99edb477 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -209,18 +209,11 @@ gulp.task('default', () => {

 // download and compile nwjs
 gulp.task('nwjs', () => {
-    return parseReqDeps().then((requiredDeps) => {
-        // required files
     nw.options.files = ['./src/**', '!./src/app/styl/**', './package.json', './README.md', './CHANGELOG.md', './LICENSE.txt', './.git.json'];
-        // add node_modules
-        nw.options.files = nw.options.files.concat(requiredDeps);
     // remove junk files
     nw.options.files = nw.options.files.concat(['!./node_modules/**/*.bin', '!./node_modules/**/*.c', '!./node_modules/**/*.h', '!./node_modules/**/Makefile', '!./node_modules/**/*.h', '!./**/test*/**', '!./**/doc*/**', '!./**/example*/**', '!./**/demo*/**', '!./**/bin/**', '!./**/build/**', '!./**/.*/**']);

     return nw.build();
-    }).catch(function (error) {
-        console.error(error);
-    });
 });


Was this page helpful?
0 / 5 - 0 ratings

Related issues

vRITHNER picture vRITHNER  路  4Comments

Faaabiii picture Faaabiii  路  4Comments

rohinarora picture rohinarora  路  4Comments

123Olairy picture 123Olairy  路  3Comments

kumavis picture kumavis  路  5Comments