-
Notifications
You must be signed in to change notification settings - Fork 12
CombineExecutable Doesn't Work on node.js 4.0.0 #9
Comments
Not good. It doesn't work in node.js 0.10/0.11, either. Maybe I should seek for another approach? |
The tests passed and the built executables worked with node.js 0.10.44/0.11.16/4.0.0 on Windows. And when I went to test again on Mac OS X, the built executables also worked on Windows. WTF? |
@vzamanillo I don't think this is related as this issue should produce an executable which fails opening with 7zip, but according to your screenshot, it worked as expected. |
The linux build works (the package is created and app starts normally via . npm version: 2.15.8 The gulp task: var gulp = require('gulp'),
glp = require('gulp-load-plugins')(),
nwb = require('nwjs-builder'),
argv = require('yargs').alias('p', 'platforms').argv,
paths = {
base: './',
build: './build',
src: './src',
css: './src/css',
images: './src/images',
language: './src/language',
lib: './src/lib',
templates: './src/templates',
themes: './src/themes',
vendor: './src/vendor'
},
detectCurrentPlatform = function () {
switch (process.platform) {
case 'darwin':
return process.arch === 'x64' ? 'osx64' : 'osx32';
case 'win32':
return (process.arch === 'x64' || process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432')) ? 'win64' : 'win32';
case 'linux':
return process.arch === 'x64' ? 'linux64' : 'linux32';
}
};
// cleans build directory
gulp.task('clean:build', function () {
return gulp.src(paths.build, {
read: false
}).pipe(glp.clean());
});
gulp.task('build', ['clean:build'], function () {
return new Promise(function (resolve, reject) {
nwb.commands.nwbuild(paths.src, {
version: '0.15.4',
platforms: argv.p ? argv.p : detectCurrentPlatform(),
withFFmpeg: true,
production: true,
macIcns: paths.images + '/popcorntime.icns',
winIco: paths.images + '/popcorntime.ico',
sideBySide: false,
//outputFormat: 'ZIP',
outputDir: paths.build
}, function (err) {
if (err) {
reject(err);
}
return resolve();
});
});
}); |
@vzamanillo What about unzipping |
Unzipping |
@vzamanillo Hmmm. It's weird. Have you tried other versions of nw.js? |
NW.js 0.16.0-beta2: app does not run. :/ |
:/ |
@vzamanillo I didn't find many differences between the building procedures for Linux and Windows. The last straw is to unzip the
If all of the above refuse to work, you can always send me a sample which I can play with and I will see what I can do for you. Good luck to you. |
@evshiron , thank you very much for your help, I tried zipping the contents of my |
@vzamanillo You are welcome. Using an earlier version of nw.js like 0.14.4 might help. I don't know. |
Finally I got the way to do it work but I still without know what the problem was, I think is related to long paths in The steps to build the package and do it work:
|
@vzamanillo LOL that's why I asked about npm version first (but I thought you were using npm 3 when you said your node.js version was 4.4.6 |
I see, seems like it's a pretty old (and known) problem when building packages in Windows OS, I did find a lot of information about (too late :/), but I am glad because I learned much things about how NW.js works (LOL), in the other hand, I would like to help you with the original issue, I will try it. Thank you one more time. |
@vzamanillo That's really helpful. I use nvm-windows to switch node.js versions on Windows, which should bring convenience when you do the tests. |
Build results (Windows 10, 64 bits):
I can not test |
@vzamanillo The "nw.js exits with code 233" is for testing |
Can't run test with npm ERR! Error: No compatible version found: debug@'^2.2.0'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.1.0","0.2.0","0.3.0","0.4.0","0.4.1","0.5.0","0.6.0","0.7.0","0.7.1","0.7.2","0.7.3","0.7.4","0.8.0","0.8.1","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","2.0.0","2.1.0","2.1.1","2.1.2","2.1.3","2.2.0"]
npm ERR! at installTargetsError (C:\Users\vzamanillo\AppData\Roaming\nvm\v0.10.0\node_modules\npm\lib\cache.js:682:10)
npm ERR! at C:\Users\vzamanillo\AppData\Roaming\nvm\v0.10.0\node_modules\npm\lib\cache.js:597:10
npm ERR! at saved (C:\Users\vzamanillo\AppData\Roaming\nvm\v0.10.0\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
npm ERR! at Object.oncomplete (fs.js:93:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\desarrollo\GitWorkspace\nwjs-builder
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14 If I ignore it and try to run the tests C:\desarrollo\GitWorkspace\nwjs-builder>npm test
> nwjs-builder@1.13.1 pretest C:\desarrollo\GitWorkspace\nwjs-builder
> npm run build
> nwjs-builder@1.13.1 build C:\desarrollo\GitWorkspace\nwjs-builder
> babel -d . ./src/
"babel" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
npm ERR! nwjs-builder@1.13.1 build: `babel -d . ./src/`
npm ERR! `cmd "/c" "babel -d . ./src/"` failed with 1
npm ERR!
npm ERR! Failed at the nwjs-builder@1.13.1 build script.
npm ERR! This is most likely a problem with the nwjs-builder package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel -d . ./src/
npm ERR! You can get their info via:
npm ERR! npm owner ls nwjs-builder
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! cwd C:\desarrollo\GitWorkspace\nwjs-builder
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\desarrollo\GitWorkspace\nwjs-builder\npm-debug.log
npm ERR! not ok code 0
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0 |
@vzamanillo Oh, I have encountered this issue before, because of npm 1. Try using latest version of node.js like 0.10.44 and 0.11.16. |
Build results (Windows 10, 64 bits):
|
@vzamanillo Thanks a lot for the help! |
There are bytes missing at the end of the outcome, which fails nw.js loading.
But things do work on node.js 4.1.0 and later.
The text was updated successfully, but these errors were encountered: