NW.js Help Needed with nw-builder for macOS ARM64. Error: unknown option ‘–mode=build’

Since nw-builder-phoenix doesn’t support macOS ARM64, I decided to switch to nw-builder.

However, I’m struggling to understand how nw-builder works. I created a simple test project following the README notes, but I’m encountering errors. I might be doing something wrong, but I want to at least run something very simple at first. I’ve tried both the CLI method and the Node manifest method, but neither has worked.

Currently, I’m getting the following error: error: unknown option '--mode=build'

Any help or guidance would be greatly appreciated!

Here’s the code:

index.html

    <!DOCTYPE html>
<html>
  <head>
    <title>NW.js Demo</title>
  </head>
  <body>
    <h1>Hello, NW.js!</h1>
    <button id="myButton">Click Me!</button>
  </body>
  <script src="main.js"></script>
</html>

main.js

document.getElementById("myButton").addEventListener("click", function () {
  alert("Button clicked!");
});

package.json

{
  "name": "nw-builder-demo",
  "version": "0.0.1",
  "description": "A Simple nw-builder DEMO",
  "main": "index.html",
  "volta": {
    "node": "22.7.0"
  },
  "scripts": {
    "start": "nw .",
    "build": "nwbuild --mode=build --glob=false --flavor=normal --arch=arm64 --cacheDir=./node_modules/nw  --outDir=./build ."
  },
  "app": {
    "id": "com.example-demo.nwjs-builder",
    "name": "NW.js Demo",
    "description": "A simple NW.js demo application."
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "base-volta-off-of-nwjs": "^1.0.5",
    "nw": "^0.92.0",
    "nw-builder": "^4.11.4"
  }
}