Operating System Version:
Debian 8.8
Popcorn Time Version:
9e25e9f
Download date:
Pulled from Git
gulp build should not return an error.
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
I'm not sure, but I think this is caused by the NPM 5.0 update.
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);
- });
});
Most helpful comment
Here is a dirty workaround: