Skip to content

Can't update "error code EBADENGINE" #8337

@Dark-Thoughts

Description

@Dark-Thoughts

I keep seeing the update notification in topgrade.

npm notice New major version of npm available! 10.9.2 -> 11.4.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.4.1
npm notice To update run: npm install -g [email protected]

But when I try that command it always errors out:

0 verbose cli /var/home/*****/.nvm/versions/node/v20.16.0/bin/node /home/*****/.nvm/versions/node/v20.16.0/bin/npm
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/npmrc
4 silly config load:file:/home/*****/.npmrc
5 silly config load:file:/var/home/*****/.nvm/versions/node/v20.16.0/etc/npmrc
6 verbose title npm install [email protected]
7 verbose argv "install" "--global" "[email protected]"
8 verbose logfile logs-max:10 dir:/home/*****/.npm/_logs/2025-05-31T21_17_38_550Z-
9 verbose logfile /home/*****/.npm/_logs/2025-05-31T21_17_38_550Z-debug-0.log
10 silly logfile start cleaning logs, removing 1 files
11 silly logfile done cleaning log files
12 http fetch GET 200 https://registry.npmjs.org/npm 221ms (cache updated)
13 verbose stack Error: Unsupported engine
13 verbose stack     at Object.checkEngine (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/npm-install-checks/lib/index.js:16:25)
13 verbose stack     at Install.exec (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/lib/commands/install.js:113:16)
13 verbose stack     at async Npm.exec (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/lib/npm.js:207:9)
13 verbose stack     at async module.exports (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/lib/cli/entry.js:74:5)
14 verbose pkgid [email protected]
15 error code EBADENGINE
16 error engine Unsupported engine
17 error engine Not compatible with your version of node/npm: [email protected]
18 error notsup Not compatible with your version of node/npm: [email protected]
18 error notsup Required: {"node":"^20.17.0 || >=22.9.0"}
18 error notsup Actual:   {"npm":"10.9.2","node":"v20.16.0"}
19 verbose cwd /var/home/*****
20 verbose os Linux 6.14.6-106.bazzite.fc42.x86_64
21 verbose node v20.16.0
22 verbose npm  v10.9.2
23 verbose exit 1
24 verbose code 1
25 error A complete log of this run can be found in: /home/*****/.npm/_logs/2025-05-31T21_17_38_550Z-debug-0.log

I also tried a regular npm install which gives a slightly different one:

0 verbose cli /var/home/*****/.nvm/versions/node/v20.16.0/bin/node /home/*****/.nvm/versions/node/v20.16.0/bin/npm
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/npmrc
4 silly config load:file:/var/home/*****/.npmrc
5 silly config load:file:/home/*****/.npmrc
6 silly config load:file:/var/home/*****/.nvm/versions/node/v20.16.0/etc/npmrc
7 verbose title npm install
8 verbose argv "install"
9 verbose logfile logs-max:10 dir:/home/*****/.npm/_logs/2025-05-31T21_21_19_677Z-
10 verbose logfile /home/*****/.npm/_logs/2025-05-31T21_21_19_677Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
13 silly logfile done cleaning log files
14 silly idealTree buildDeps
15 silly reify moves {}
16 verbose stack Error: Could not read package.json: Error: ENOENT: no such file or directory, open '/var/home/*****/package.json'
16 verbose stack     at async open (node:internal/fs/promises:639:25)
16 verbose stack     at async readFile (node:internal/fs/promises:1249:14)
16 verbose stack     at async read (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/@npmcli/package-json/lib/read-package.js:9:18)
16 verbose stack     at async PackageJson.load (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/@npmcli/package-json/lib/index.js:131:31)
16 verbose stack     at async PackageJson.normalize (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/@npmcli/package-json/lib/index.js:117:5)
16 verbose stack     at async runScript (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js:11:28)
16 verbose stack     at async Install.exec (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/lib/commands/install.js:163:9)
16 verbose stack     at async Npm.exec (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/lib/npm.js:207:9)
16 verbose stack     at async module.exports (/var/home/*****/.nvm/versions/node/v20.16.0/lib/node_modules/npm/lib/cli/entry.js:74:5)
17 error code ENOENT
18 error syscall open
19 error path /var/home/*****/package.json
20 error errno -2
21 error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/var/home/*****/package.json'
22 error enoent This is related to npm not being able to find a file.
22 error enoent
23 verbose cwd /var/home/*****
24 verbose os Linux 6.14.6-106.bazzite.fc42.x86_64
25 verbose node v20.16.0
26 verbose npm  v10.9.2
27 verbose exit -2
28 verbose code -2
29 error A complete log of this run can be found in: /home/*****/.npm/_logs/2025-05-31T21_21_19_677Z-debug-0.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions