It's most likely some misunderstanding on my side since I did not find any information of this by googling and searching the issues here.
Every time I run the packaged app, I got the warning:
"Pkg: FLAGS_MISMATCH"
I tried only using a index.js file with only the argv print operation.
process.argv.forEach(function(val, index, array) {
console.log(index + ': ' + val);
});
Run
pkg index.js -t macos
And run the packaged app, still the same result.
My node version: v10.7.0. pkg version is 4.3.3.
Ran into this when I added --options prof to the pkg command.
you may also check if there is NODE_OPTIONS environment variable set
@hshixun Thanks, will check that var next time.
Running into this over at https://github.com/lando/lando
We compile lando with pkg without settings any v8 options. If a user exports NODE_OPTIONS to anything (eg export NODE_OPTIONS=--max_old_space_size=4096) then tries to run lando it results in "Pkg: FLAGS_MISMATCH".
Is there a way to compile lando so that a user's NODE_OPTIONS is ignored if set to something mismatched?
Any update on this?
Seems like an enormous bug... anyone with the NODE_OPTIONS env var set cannot invoke executables compiled with pkg.
It also seems easy to fix. Can pkg simply clear the NODE_OPTIONS env var when invoking the bundled node at runtime? For reference, node itself complains about FLAGS_MISMATCH.
I'm keen for an update, too. Having to unset NODE_OPTIONS each time is getting real old!
This is breaking my balls as well.
Lol this is stupid. It seems to work if you compile it with options though e.g.
pkg . --options max_old_space_size=4096
Most helpful comment
This is breaking my balls as well.