Rich Chen
Rich Chen

Reputation: 1

Bearer "" is not a legal HTTP value

I was trying to install some dependencies for a git repo via npm install on a Macbook (running MacOS Monterey 12.4) when I first got this error:

8117 verbose stack TypeError: Bearer “” is not a legal HTTP header value
8117 verbose stack     at validateValue (/Users/rich.chen/.nvm/versions/node/v18.7.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/headers.js:15:11)
8117 verbose stack     at Headers.append (/Users/rich.chen/.nvm/versions/node/v18.7.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/headers.js:119:5)
8117 verbose stack     at new Headers (/Users/rich.chen/.nvm/versions/node/v18.7.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/headers.js:77:16)
8117 verbose stack     at new Request (/Users/rich.chen/.nvm/versions/node/v18.7.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/request.js:56:21)
8117 verbose stack     at makeFetchHappen (/Users/rich.chen/.nvm/versions/node/v18.7.0/lib/node_modules/npm/node_modules/make-fetch-happen/lib/index.js:9:19)
8117 verbose stack     at doFetch (/Users/rich.chen/.nvm/versions/node/v18.7.0/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/index.js:108:15)
8118 verbose cwd /Users/rich.chen/Documents/xealth-tools-framework/customer-infra-tracker/client
8119 verbose Darwin 21.5.0
8120 verbose node v18.7.0
8121 verbose npm  v8.15.0
8122 error Bearer “” is not a legal HTTP header value
8123 verbose exit 1

Now, running any npm install or npm update command results in the same error.

What I've tried so far (to no avail)

I am noticing that it's probably an issue with npm, npm update runs into the same issue and does not execute successfully.

Any help is appreciated. Thanks!

Upvotes: 0

Views: 1465

Answers (0)

Related Questions