Skip to content

Recommended Node version? #176

Closed
Closed

Description

@Simx72

Hello,

This is probably 2 related issues...

  1. What is the recommended node version. I couldn't find one in the build docs. I guess it's 22. It didn't work with 24, and it did work with 22.

  2. I think the recommended version should be added to the docs, maybe in the common build problems. I've been around three days trying to debug electron and mocha who refused to work. It turns out it was caused by the version, I was using the latest one. I installed Node.js in like 3 different ways according to their site and I didn't think it could be the version's fault.

Well, I'll stop my complaining, but for real this could probably help someone in the future. I also found you can enforce this through the package.json file https://stackoverflow.com/questions/29349684/how-can-i-specify-the-required-node-js-version-in-package-json

Thanks

Activity

  1. CrystalSplitter commented on Jun 26, 2026

    @CrystalSplitter
    Collaborator

    Huh, it should work with the latest... I think this is probably a bug. What was the error you got?

  2. added
    bug
    on Jun 26, 2026
  3. CrystalSplitter commented on Jun 26, 2026

    @CrystalSplitter
    Collaborator

    For exact reference, my own version of node (while using nix):

    [crystal@seafoam:~/proj/fluentflame-reader/nix]$ node --version
    v24.15.0
    
    [crystal@seafoam:~/proj/fluentflame-reader/nix]$ cd ..
    
    [crystal@seafoam:~/proj/fluentflame-reader]$ npm run build && npm run electron
    
    > [email protected] build
    > webpack --config ./webpack.config.js
    
    (node:2308261) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] DeprecationWarning: Compilation.modules was changed from Array to Set (using Array method 'reduce' is deprecated)
    (Use `node --trace-deprecation ...` to show where the warning was created)
    (node:2308261) [DEP_WEBPACK_MODULE_ERRORS] DeprecationWarning: Module.errors was removed (use getErrors instead)
    asset electron.js 211 KiB [compared for emit] [minimized] (name: main) 1 related asset
    orphan modules 27.1 KiB [orphan] 7 modules
    runtime modules 786 bytes 4 modules
    modules by path ./node_modules/ 449 KiB
      javascript modules 446 KiB 84 modules
      json modules 3.12 KiB
        ./node_modules/ajv/lib/refs/json-schema-draft-07.json 2.72 KiB [built] [code generated]
        ./node_modules/ajv/lib/refs/data.json 409 bytes [built] [code generated]
    + 13 modules
    
    WARNING in ./src/main/utils.ts 37:28-35
    Should not import the named export 'version' (imported as 'version') from default-exporting module (only default export is available soon)
     @ ./src/main/window.ts 5:0-44 26:8-25
     @ ./src/electron.ts 4:0-46 137:23-36
    
    webpack 5.104.1 compiled with 1 warning in 9228 ms
    
    asset preload.js 5.41 KiB [compared for emit] [minimized] (name: main)
    orphan modules 8.64 KiB [orphan] 3 modules
    ./src/preload.ts + 3 modules 8.88 KiB [not cacheable] [built] [code generated]
    webpack 5.104.1 compiled successfully in 6415 ms
    
    assets by path icons/ 215 KiB
      assets by path icons/*.woff 172 KiB 14 assets
      assets by path icons/*.svg 43.5 KiB 3 assets
    assets by path styles/*.css 30.4 KiB
      asset styles/cards.css 8.72 KiB [compared for emit] [from: resources/styles/cards.css] [copied] [minimized]
      + 5 assets
    assets by path article/ 417 KiB
      assets by path article/*.js 414 KiB 2 assets
      asset article/article.css 2.23 KiB [compared for emit] [from: resources/article/article.css] [copied] [minimized]
      asset article/article.html 926 bytes [compared for emit] [from: resources/article/article.html] [copied] [minimized]
    + 6 assets
    orphan modules 3.77 MiB [orphan] 1184 modules
    runtime modules 2.43 KiB 8 modules
    cacheable modules 3.38 MiB
      javascript modules 3.36 MiB
        modules by path ./node_modules/ 933 KiB 160 modules
        ./src/index.tsx + 506 modules 2.44 MiB [built] [code generated]
        util (ignored) 15 bytes [built] [code generated]
        util (ignored) 15 bytes [built] [code generated]
        ./util.inspect (ignored) 15 bytes [built] [code generated]
      json modules 30 KiB
        ./node_modules/rss-parser/node_modules/entities/lib/maps/entities.json 28.4 KiB [built] [code generated]
        ./node_modules/rss-parser/node_modules/entities/lib/maps/legacy.json 1.24 KiB [built] [code generated]
        ./node_modules/rss-parser/node_modules/entities/lib/maps/xml.json 62 bytes [built] [code generated]
        ./node_modules/rss-parser/node_modules/entities/lib/maps/decode.json 308 bytes [built] [code generated]
    webpack 5.104.1 compiled successfully in 12854 ms
    
    > [email protected] electron
    > electron ./dist/electron.js

    It runs fine?

  4. CrystalSplitter commented on Jun 26, 2026

    @CrystalSplitter
    Collaborator

    I've bumped my own system dependency version up to make sure it's 24 for Nix at least. I'll also update the builders so that we should be building them with 24 as well.

  5. CrystalSplitter commented on Jun 26, 2026

    @CrystalSplitter
    Collaborator

    Based on the workflow failures, this is an error on Windows and MacOS; seems likely something wrong with the dependency calculation with what's pulled into utils.js. I'll take a look. For now, use npm 22. But indeed, it should work with newer versions! This is a bug.

  6. CrystalSplitter commented on Jun 27, 2026

    @CrystalSplitter
    Collaborator

    Should be fixed in #178, after testing on ubuntu, macos, and windows. Thank you very much for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions