Electron issue with version 18.3

Hello Jean emmanuel,
I have a problem with the version 18.3 node under electron and I have the following error message when I do "npm start" in the terminal:

Unknown argument: index.js

I am currently on Mac with the 15.0 node which works fine.

Any idea?

Node 16.16.0 max works as mentioned on electronjs.org

It's not related @Greenman, that's just the version of the node binary shipped with electron.

@zig: I gave it a try with node 18.12 and it works fine.

@zig: I figured you might be talking about the version of Electron, in which case it's simply not supported, it's set to 15.1.0 in package.json for a reason, I change it as rarely as I can because it always brings problems.

do you talk about running from the sources (git pull, npm start, npm run build) ?

I meet an issue Unknown argument: app/ on macOS Ventura 13.0 (22A380)

Summary
 ~/audio/openStageControl/open-stage-control  on master ?1  node -v                                                                                                ✔  16.18.0 Node  at 15:45:48 
v16.18.0

 ~/audio/openStageControl/open-stage-control  on master ?1  git status                                                                                             ✔  16.18.0 Node  at 15:45:52 
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        package-lock.json

nothing added to commit but untracked files present (use "git add" to track)

 ~/audio/openStageControl/open-stage-control  on master ?1  git pull                                                                                               ✔  16.18.0 Node  at 15:46:06 
Already up to date.

 ~/audio/openStageControl/open-stage-control  on master ?1  npm install                                                                                            ✔  16.18.0 Node  at 15:46:17 
npm WARN deprecated @serialport/binding-abstract@9.2.4: This package has been renamed to @serialport/bindings-interface
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated asar@3.2.0: Please use @electron/asar moving forward.  There is no API change, just a package name change
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated electron-notarize@1.2.2: Please use @electron/notarize moving forward.  There is no API change, just a package name change
npm WARN deprecated electron-osx-sign@0.5.0: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @serialport/bindings@9.2.9: This package has been renamed to @serialport/bindings-cpp.
npm WARN deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@3.22.5: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

> open-stage-control@1.19.0-beta2 postinstall
> echo '\033[36m=> Dependencies installed successfully. Run "npm run build" to build the assets.\033[0m
> '

=> Dependencies installed successfully. Run "npm run build" to build the assets.


added 1047 packages, and audited 1048 packages in 54s

131 packages are looking for funding
  run `npm fund` for details

14 vulnerabilities (9 moderate, 5 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

 ~/a/o/open-stage-control  on master ?1  npm run build                                                                                                   ✔  took 54s  16.18.0 Node  at 15:47:22 

> open-stage-control@1.19.0-beta2 build
> npm run build-css && npm run build-js && node scripts/copy-assets.js && echo '\033[36m=> JS and CSS assets built successfully. Run "npm run package" to build an executable or "npm start" to run the app.\033[0m
> '


> open-stage-control@1.19.0-beta2 build-css
> node scripts/build-css.js


> open-stage-control@1.19.0-beta2 build-js
> npm run build-launcher-js && npm run build-client-js && npm run build-server-js


> open-stage-control@1.19.0-beta2 build-launcher-js
> node scripts/build-launcher.js

(node:26889) [DEP0128] DeprecationWarning: Invalid 'main' field in '/Users/nlb/audio/openStageControl/open-stage-control/node_modules/mold-source-map/package.json' of 'mold-source-map.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)

> open-stage-control@1.19.0-beta2 build-client-js
> node scripts/build-client.js

=> Building compressed client scripts...
(node:26891) [DEP0128] DeprecationWarning: Invalid 'main' field in '/Users/nlb/audio/openStageControl/open-stage-control/node_modules/mold-source-map/package.json' of 'mold-source-map.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)

> open-stage-control@1.19.0-beta2 build-server-js
> node scripts/build-server.js

(node:26902) [DEP0128] DeprecationWarning: Invalid 'main' field in '/Users/nlb/audio/openStageControl/open-stage-control/node_modules/mold-source-map/package.json' of 'mold-source-map.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
=> JS and CSS assets built successfully. Run "npm run package" to build an executable or "npm start" to run the app.


 ~/a/o/open-stage-control  on master ?1  npm start                                                                                                       ✔  took 11s  16.18.0 Node  at 15:49:39 

> open-stage-control@1.19.0-beta2 start
> electron app/


Usage:
Electron [options]

Options:
  -s, --send            default targets for all widgets (ip: port / domain: port
                        / midi: port_name pairs)                         [array]
  -l, --load            session file to load (.json)                    [string]
      --state           state file to load (.state)                     [string]
  -c, --custom-module   custom module file to load (.js)
                        WARNING: custom module can access the file system, use
                        at your own risk.                               [string]
  -p, --port            http port of the server (default to 8080)       [number]
  -o, --osc-port        osc input port (default to --port)              [number]
      --tcp-port        tcp server input port                           [number]
      --tcp-targets     tcp servers to connect to (ip: port pairs), does not
                        substitute for --send                            [array]
  -m, --midi            midi router settings                             [array]
  -d, --debug           log received osc messages in the console       [boolean]
  -n, --no-gui          disable default gui                            [boolean]
      --fullscreen      launch in fullscreen mode (only affects the default
                        client gui)                                    [boolean]
  -t, --theme           theme name or path (multiple values allowed)     [array]
      --client-options  client options (opt=value pairs)                 [array]
      --disable-vsync   disable gui's vertical synchronization         [boolean]
      --force-gpu       ignore chrome's gpu blacklist                  [boolean]
      --read-only       disable session editing and session history changes
                                                                       [boolean]
      --remote-saving   disable remote session saving for hosts that don't match
                        the regular expression                          [string]
      --remote-root     set remote file browsing root folder            [string]
      --authentication  restrict access to "user:password" (remote clients will
                        be prompted for these credentials)              [string]
      --instance-name   used to differentiate multiple instances in a zeroconf
                        network                                         [string]
      --use-ssl         set to true to use HTTPS protocol instead of HTTP (a
                        self-signed certificate will be created)       [boolean]
      --disable-gpu     disable hardware acceleration                  [boolean]
      --inspect         enable node/electron inspector                 [boolean]
      --cache-dir       override default cache directory                [string]
      --config-file     override default config file (defaults to
                        cache-dir/config.json)                          [string]
      --docs            serve documentation website locally and open it with the
                        system's default browser                       [boolean]
  -h, --help            Show help                                      [boolean]
  -v, --version         Show version number                            [boolean]

Unknown argument: app/

I just tested on a fresh clone with the same node version as you and it works just fine.

Bonjour @jean-emmanuel

Sous windows, le principal souci provient du paquet node-sass qui n'est pas disponible pour node 18.

De plus, sur le site officiel de node-sass

node-sass
Warning: LibSass and Node Sass are deprecated. While they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass.

Il semblerait que l'avenir c'est dart-sass qui depuis a été rebaptisé en sass tout court

Il existe un outil pour migrer.

https://www.alsacreations.com/astuce/lire/1865-Passer-de-node-sass-a-dart-sass.html

Qu'en penses-tu ?


Greenman

[...] While they will continue to receive maintenance releases indefinitely [...]

Tant que ça fonctionne pour moi et pour construire les paquets, je ne changerai rien.

ok
Dans ce cas, donc builder la version o-s-c depuis les sources sous node 18 ne marche pas mais fonctionne avec la version 16 (comme indiqué dans la doc :slight_smile: Edit: pas testé... Avec ubuntu WSL, cela ne fonctionne pas) ce qui en soit n'est pas un souci puisque la version 16 est supportée jusqu'au 30 avril 2024.

Donc le plus simple sous windows c'est d'utiliser le exe fourni.