Skip to content

Bug report: Can't install CyberChef in Node v.22 #2108

@q2dg

Description

@q2dg

Describe the bug
CyberChef isn't compatible with Node v.22

To Reproduce
I follow steps indicated in wiki's "Gettings Started" guide:

 git clone https://github.com/gchq/CyberChef.git
 cd CyberChef
 npm install
 npm start

npm install command finished well (though many vulnerabilities are shown) but npm start command gives this error message:

> [email protected] start
> npx grunt dev
Running "clean:dev" (clean) task
>> 0 paths cleaned.
Running "clean:config" (clean) task
>> 1 path cleaned.
Running "exec:generateConfig" (exec) task
--- Regenerating config files. ---
Written operation index.
--- Config scripts finished. ---
file:///home/q2dg/CyberChef/src/core/Recipe.mjs:7
import OperationConfig from "./config/OperationConfig.json" assert {type: "json"};
                                                            ^^^^^^
SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:107:18)
    at #translate (node:internal/modules/esm/loader:536:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:583:27)
    at async ModuleJob._link (node:internal/modules/esm/module_job:162:19)
Node.js v22.18.0
Running "concurrent:dev" (concurrent) task
    Running "watch:config" (watch) task
    Waiting...
    Running "webpack-dev-server:start" (webpack-dev-server) task
    <i> [webpack-dev-server] Project is running at:
    <i> [webpack-dev-server] Loopback: http://localhost:8080/, http://[::1]:8080/
    <i> [webpack-dev-server] Content not from webpack is served from '/home/q2dg/CyberChef/public' directory
    Browserslist: browsers data (caniuse-lite) is 8 months old. Please run:
      npx update-browserslist-db@latest
      Why you should do it regularly: https://github.com/browserslist/update-db#readme
    assets by path assets/ 16 MiB
      assets by status 15.9 MiB [big]
        assets by path assets/tesseract/ 14.9 MiB 2 assets
        asset assets/main.css 645 KiB [emitted] [big] (name: main) 2 related assets
        asset assets/02aafe15b98928fdaa38.ttf 346 KiB [emitted] [immutable] [from: src/web/static/fonts/MaterialIcons-Regular.ttf] [big] (auxiliary name: main)
      asset assets/tesseract/worker.min.js 121 KiB [emitted] [from: node_modules/tesseract.js/dist/worker.min.js] [copied] 2 related assets
      asset assets/forge/prime.worker.min.js 20.6 KiB [emitted] [from: node_modules/node-forge/dist/prime.worker.min.js] [copied] 2 related assets
      asset assets/aecc661b69309290f600.ico 1.06 KiB [emitted] [immutable] [from: src/web/static/images/favicon.ico]
    assets by path images/*.png 31.7 KiB
      asset images/file-128x128.png 18.9 KiB [emitted] [from: src/web/static/images/file-128x128.png] (auxiliary name: main)
      asset images/cyberchef-128x128.png 5.83 KiB [emitted] [from: src/web/static/images/cyberchef-128x128.png]
      asset images/fork_me.png 5.33 KiB [emitted] [from: src/web/static/images/fork_me.png]
      asset images/cook_male-32x32.png 1.59 KiB [emitted] [from: src/web/static/images/cook_male-32x32.png]
    asset main.js 11.6 MiB [emitted] [big] (name: main) 2 related assets
    asset index.html 97.8 KiB [emitted] 2 related assets
    2 ERRORS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
    webpack 5.97.1 compiled with 2 errors in 13068 ms

Expected behaviour
I'd like to have Cyberchef installed correctly

Screenshots
If I run a browser and I go to http://locahost:8080 while npm start (with shown errors) is running, I get this:

Image

Desktop (if relevant, please complete the following information):

  • OS: Fedora 43
  • CyberChef version: Latest from github

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions