You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did the sw_vers command change over time in macOS? While running this on my macOS 13.4.1, I get an error running start :
./node_modules/electron-to-nwjs/node_modules/semver/classes/semver.js:38
throw new TypeError(`Invalid Version: ${version}`)
^
TypeError: Invalid Version: 13.4.1.0
at new SemVer (./node_modules/electron-to-nwjs/node_modules/semver/classes/semver.js:38:13)
at compare (./node_modules/electron-to-nwjs/node_modules/semver/functions/compare.js:3:3)
at Object.gte (./node_modules/electron-to-nwjs/node_modules/semver/functions/gte.js:2:30)
at Versions.isVersionEqualOrSuperiorThanVersion (./node_modules/electron-to-nwjs/scripts/utils/versions.js:5:23)
at currentSystemRecommendedNwjsVersion (./node_modules/electron-to-nwjs/index.js:36:23)
at Object.<anonymous> (./node_modules/electron-to-nwjs/index.js:276:62)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
Node.js v18.16.0
Output of sw_vers -productVersion on my machine:
% sw_vers -productVersion
13.4.1
Possible fix (where I count the number of dots):
constcurrentSystemRecommendedNwjsVersion=function(){// Reference:// https://dev.to/thejaredwilcurt/guide-to-nw-js-versions-5d38#osx-supportletplatform=getCurrentOs();if(platform==="mac"){letosVersion=child_process_1.default.execSync("sw_vers -productVersion",{encoding: 'utf-8'}).toString().trim();constdotCount=osVersion.match(/\./g).length;constosVersionSem=osVersion+(dotCount==1 ? ".0" : "")if(!Versions.isVersionEqualOrSuperiorThanVersion(osVersionSem,"10.9.0")){// NW.js v0.14.7 and below works with 10.6+// NW.js v0.15.0 works with 10.9+return"0.14.7";}if(!Versions.isVersionEqualOrSuperiorThanVersion(osVersionSem,"10.10.0")){// NW.js v0.29.0 works with 10.10+return"0.28.3";}if(!Versions.isVersionEqualOrSuperiorThanVersion(osVersionSem,"10.11.0")){// NW.js v0.51.0 works with 10.11+return"0.50.3";}if(!Versions.isVersionEqualOrSuperiorThanVersion(osVersionSem,"10.15.0")){// NW.js v0.64.1 works with 10.15 and no longer accurately updates the plist filereturn"0.64.0";}}return"0.69.1";};
In the meanwhile, the latest NW.js version is also 0.79.1
The text was updated successfully, but these errors were encountered:
That part of the blog post I wrote is the least trustworthy. I can't say with certainty the accuracy of those version numbers equating to support precisely. So it feels weird to have it codified like this. For example, I've got 10.11 running in a VM right now and it runs NW.js 0.12.3 just fine. I'd need to download later versions and see when it stops working. It's also not always obvious when something stops working, sometimes it still loads but wouldn't have full support for all features.
Hi,
Did the
sw_vers
command change over time in macOS? While running this on my macOS 13.4.1, I get an error runningstart
:Output of
sw_vers -productVersion
on my machine:Possible fix (where I count the number of dots):
In the meanwhile, the latest NW.js version is also 0.79.1
The text was updated successfully, but these errors were encountered: