You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take what you will from this. I was unable to upgrade my npm or do anything. It appears this is still the latest version of npm 11 and the latest version of node 22 at time of writing.
Running any npm install command results in:
npm version patch -m "chore(patch): release %s"
ERROR: npm v11.1.0 is known not to run on Node.js v22.13.1. This version of npm supports the following node versions: `^20.17.0 || >=22.9.0`. You can find the latest version at https://nodejs.org/.
ERROR:
/Users/jsenkpiel/Library/Application Support/fnm/node-versions/v22.13.1/installation/lib/node_modules/npm/node_modules/semver/classes/semver.js:303
SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1512:18)
at Module._compile (node:internal/modules/cjs/loader:1534:20)
at Object..js (node:internal/modules/cjs/loader:1699:10)
at Module.load (node:internal/modules/cjs/loader:1313:32)
at Function._load (node:internal/modules/cjs/loader:1123:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1335:12)
at require (node:internal/modules/helpers:136:16)
at Object.<anonymous> (/Users/jsenkpiel/Library/Application Support/fnm/node-versions/v22.13.1/installation/lib/node_modules/npm/node_modules/semver/functions/compare.js:1:16)
The actual error is also very unhelpful.
Invalid or unexpected token
Which/what token?? Where?? I can't fix this even if I wanted to.
Temporarily resolved by wiping my node install in fnm and re-installing. (And not upgrading npm.)
Expected Behavior
npm functions as normal for any given command.
Steps To Reproduce
Install Node.js stable (22.13.1).
Run npm i -g npm.
Try to run any npm install command.
Environment
npm: 11.0.1
Node.js: 22.13.1
OS Name: macOS Sequoia 15.2 (24C101)
System Model Name: MacBook Pro M4
npm config: (Note: taken after I wiped my install to make things work again.)
; "user" config from /Users/jsenkpiel/.npmrc
<internal artifactory>:_authToken = (protected)
<internal artifactory>:_authToken = (protected)
prefer-offline = true
progress = false
; registry = "<internal artifactory>" ; overridden by project; "project" config from <internal project>message = "chore(patch): release %s"registry = "<internal artifactory>"tag-version-prefix = ""; node bin location = /Users/jsenkpiel/Library/Application Support/fnm/node-versions/v22.13.1/installation/bin/node; node version = v22.13.1; npm local prefix = <internal project>; npm version = 10.9.2; cwd = <internal project>; HOME = /Users/jsenkpiel; Run `npm config ls -l` to show all defaults.
The text was updated successfully, but these errors were encountered:
This is likely to be problem with your installation of node. Please check and fix installation if you are using node version managers like nvm, fnm etc.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Take what you will from this. I was unable to upgrade my npm or do anything. It appears this is still the latest version of npm 11 and the latest version of node 22 at time of writing.
Running any
npm install
command results in:The actual error is also very unhelpful.
Which/what token?? Where?? I can't fix this even if I wanted to.
Temporarily resolved by wiping my node install in
fnm
and re-installing. (And not upgradingnpm
.)Expected Behavior
npm
functions as normal for any given command.Steps To Reproduce
npm i -g npm
.npm install
command.Environment
The text was updated successfully, but these errors were encountered: