Syntax error while running nativefier
Run nativefier "www.google.com"
v7.0.1v4.4.4Windows 10Intel Pentium G3220TC:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\progress\lib\node-progress.js:177
this.stream.clearLine();
^
TypeError: this.stream.clearLine is not a function
at ProgressBar.terminate (C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\progress\lib\node-progress.js:177:17)
at ProgressBar.tick (C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\progress\lib\node-progress.js:91:10)
at DishonestProgress.tick (C:\source\helpers\dishonestProgress.js:35:22)
at C:\source\build\buildMain.js:80:22
at fn (C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\async\lib\async.js:746:34)
at C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\async\lib\async.js:1213:16
at C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\async\lib\async.js:166:37
at C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\async\lib\async.js:706:43
at C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\async\lib\async.js:167:37
at C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\async\lib\async.js:1209:30
at C:\source\build\buildMain.js:76:17
at C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\electron-packager\index.js:238:7
at end (C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\electron-packager\node_modules\run-series\index.js:8:15)
at done (C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\electron-packager\node_modules\run-series\index.js:11:10)
at each (C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\electron-packager\node_modules\run-series\index.js:16:43)
at Object.finalizeApp [as moveApp] (C:\Users\<user>\AppData\Roaming\npm\node_modules\nativefier\node_modules\electron-packager\common.js:271:7)
Fixed it by commenting lines 177 and 178 in /nativefier/node_modules/progress/lib/node-progress.js
ProgressBar.prototype.terminate = function () {
if (this.clear) {
//this.stream.clearLine();
//this.stream.cursorTo(0);
} else console.log();
};
Hello,
I encoutered the same issue in several cases:
So, I suppose that there is a call to the progress npm package even though the progress bar will be not diplayed.
In the first case, I think this is a real issue ?
But in the second, this use case has been maybe not thought ?
Nativefier: v7.0.1
Node.js: v4.4.7
OS: Windows 7
Architecture: x64
Hello, @laudeon
There is no problem at all that the progress bar does not show in your terminal, however it gives a syntax error and requires you to manually modify the code in order for it to actually run.
Hello,
Thanks for your reply!
Yes, that is what I actually do. But I don't think that it's a good idea to modify some code from external source.
But yes, it's a temporary solution!
I have also come up against this issue. I'm trying to use Nativefier with Ansible to automate building apps. Ansible launches the process internally so no output from Nativefier is sent to the terminal. This seams to be similar to @laudeon second case mentioned above.
Also seems there are similar issues for other people using node-progress. Luckily it's easy to apply patches with Ansible so as a workaround I am commenting out the lines as mentioned by @Lempiraholio above and that works for now.
Maybe an easy fix could be to offer an arg to suppress all output? Not very elegant but avoids getting deep in the weeds with node-progress and output streams :/
This seriously needs to be fixed. I am also on Windows 8.1 with Node updated passed 4 and I ran into this problem.
Same here on Windows 10.
@Lempiraholio's fix worked.
Hey everyone, thanks for the shouts :) . Looking at changes to node-progress, this might just be fixed after our upcoming deps upgrade.
@Lempiraholio @laudeon @DominicBarnard @tfont @tkluysk thanks for the feedback! We just released Nativefier 7.2.0, which upgrades all our dependencies and includes a few more fixes. Could you try it and report back if the problem persists or is fixed?
Everything ok here under Windows 10 / Node 6 LTS (but I couldn't reproduce the problem initially, so that's moot)
Closing as issue wasn't reproducible and didn't get feedback. @Lempiraholio @laudeon @DominicBarnard @tfont @tkluysk feel free to chime in and re-open the discussion anytime 馃槂!
Most helpful comment
Fixed it by commenting lines 177 and 178 in /nativefier/node_modules/progress/lib/node-progress.js