nodist
nodist copied to clipboard
npm 8.6, authorization header missing & symlink problem
Hello,
I can't install npm 8.6.0, which is the recommanded version by node doctor
.
When using nodist global npm 8.6
:
npm 8.6
{"message":"Must specify access token via Authorization header.
https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param","documentation_url":"https://docs.github.com/v3/#oauth2-token-sent-in-a-header"}.
Sorry.
I've got no problem with previous versions. The latest installable version is 8.5.5 (match with node 17.8.0).
If I use the official command npm install -g [email protected]
, it installs but can't be used (npm -v
still return 8.5.5).
Another bug : the symlinks created automatically in npmv/8.5.5/nodes-modules
were not working on my Windows 10 system, I don't know why. I had to recreate them to have npm working as expected. Same for the ``` arborist ```` symlink in @npmcli.
If you need more infos on the specs of my computer, please ask.
Cheers !
I've returned on my project and I've tried to update npm and I'm receiving something similar:
$>nodist npm latest Unhandled rejection {"message":"Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param","documentation_url":"https://docs.github.com/v3/#oauth2-token-sent-in-a-header"}
I had a similar error message starting from scratch with nodist - I typed "nodist add 16" and it installed 11.13.0 and 16.14.2 "nodist npm" and it reported npm 6.9.0 (which doesn't work with node 16) "nodist 16" and it switched to 16 "nodist npm 8.5.5" and it reported {"message":"Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param","documentation_url":"https://docs.github.com/v3/#oauth2-token-sent-in-a-header"}. Sorry.
(I really like the "Sorry" part ;-)
the workaround I finally learned about was " nodist npm global match " which eventually finished successfully. Now typing
"nodist npm" reports 6.9.0 and 8.5.0 with 8.5.0 active.
Now I'm getting what seems to be an unrelated error: "Error: Cannot find module 'libnpmfund'"
Edit: I guess it's not an unrelated error, it seems the install of @npmcli/arborist as part of npm 8.5.0 didn't actually succeed but wasn't reported. Now I don't seem to be able to recover npm 8.5.0 or fix the install.
I´m having same issue as @joelparks
Ultimately my workaround was to skip nodist entirely, just use the installer from Node.js to get node v16.14.2 installed with npm 8.6.0 on Win10. Unfortunate that nodist or an nvm alternative doesn't seem to be available for Windows users
any news about this ?
bonjour svp aider mois je n'arrive pas à installer les asset css de breese de laravel9 ,je un systeme ubuntu 20.04 ,xampp,apache server http
As a quick fix just after doing nodist npm match|<version>
, it's to manually fix the wrong symlinks.
Pre-requisite: Windows should be configured in developer mode to avoid administration rights.
nodist npm match
cd C:\Program Files (x86)\Nodist\npmv\8.11.0\node_modules
rm @npmcli\arborist && mklink /D @npmcli\arborist ..\..\workspaces\arborist
rm libnpmaccess && mklink /D libnpmaccess ..\workspaces\libnpmaccess
rm libnpmdiff && mklink /D libnpmdiff ..\workspaces\libnpmdiff
rm libnpmexec && mklink /D libnpmexec ..\workspaces\libnpmexec
rm libnpmfund && mklink /D libnpmfund ..\workspaces\libnpmfund
rm libnpmhook && mklink /D libnpmhook ..\workspaces\libnpmhook
rm libnpmorg && mklink /D libnpmorg ..\workspaces\libnpmorg
rm libnpmpack && mklink /D libnpmpack ..\workspaces\libnpmpack
rm libnpmpublish && mklink /D libnpmpublish ..\workspaces\libnpmpublish
rm libnpmsearch && mklink /D libnpmsearch ..\workspaces\libnpmsearch
rm libnpmteam && mklink /D libnpmteam ..\workspaces\libnpmteam
rm libnpmversion && mklink /D libnpmversion ..\workspaces\libnpmversion
That is because the tar lib used by nodist seems to not create correctly symlink about directories on Windows when extracting https://codeload.github.com/npm/cli/tar.gz/v8.11.0
Workaround:
Download NPM CLI version from official repo: https://github.com/npm/cli/tree/v8.6.0
and unpack locally to your C:\Program Files (x86)\Nodist\npmv\8.6.0 folder
Yes that will work. Thank you for posting.
I will have a new package out either end of July or beginning of August. Finally, got our new office and need something to break the ice with.
https://github.com/wafflook/nodistx/
I have created an installer. I hope it will be useful for you.
The workaround doesn't seem to work, and wafflook's installer is no longer available. Any word on this?
I populated C:\Program Files (x86)\Nodist\npmv\9.5.1 with the contents of https://github.com/npm/cli/tree/v9.5.1 and then ran:
nodist npm 9.5.1 npm 9.5.1 {"message":"Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param","documentation_url":"https://docs.github.com/v3/#oauth2-token-sent-in-a-header"}. Sorry.
The workaround doesn't seem to work, and wafflook's installer is no longer available. Any word on this?
I populated C:\Program Files (x86)\Nodist\npmv\9.5.1 with the contents of https://github.com/npm/cli/tree/v9.5.1 and then ran:
nodist npm 9.5.1 npm 9.5.1 {"message":"Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param","documentation_url":"https://docs.github.com/v3/#oauth2-token-sent-in-a-header"}. Sorry.
You have to do essentially what @nicomeunier posted, but with some minor modifications:
- run
nodist npm match global
- open a command prompt (cmd, not powershell) in admin mode and input:
cd C:\Program Files (x86)\Nodist\npmv\9.5.1\node_modules
del @npmcli\arborist && mklink /D @npmcli\arborist ..\..\workspaces\arborist
del @npmcli\config && mklink /D @npmcli\config ..\..\workspaces\config
del libnpmaccess && mklink /D libnpmaccess ..\workspaces\libnpmaccess
del libnpmdiff && mklink /D libnpmdiff ..\workspaces\libnpmdiff
del libnpmexec && mklink /D libnpmexec ..\workspaces\libnpmexec
del libnpmfund && mklink /D libnpmfund ..\workspaces\libnpmfund
del libnpmhook && mklink /D libnpmhook ..\workspaces\libnpmhook
del libnpmorg && mklink /D libnpmorg ..\workspaces\libnpmorg
del libnpmpack && mklink /D libnpmpack ..\workspaces\libnpmpack
del libnpmpublish && mklink /D libnpmpublish ..\workspaces\libnpmpublish
del libnpmsearch && mklink /D libnpmsearch ..\workspaces\libnpmsearch
del libnpmteam && mklink /D libnpmteam ..\workspaces\libnpmteam
del libnpmversion && mklink /D libnpmversion ..\workspaces\libnpmversion
Note using del
instead of rm
and the new link to config
that I guess was added sometime after 8.11.
The workaround doesn't seem to work, and wafflook's installer is no longer available. Any word on this? I populated C:\Program Files (x86)\Nodist\npmv\9.5.1 with the contents of https://github.com/npm/cli/tree/v9.5.1 and then ran:
nodist npm 9.5.1 npm 9.5.1 {"message":"Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param","documentation_url":"https://docs.github.com/v3/#oauth2-token-sent-in-a-header"}. Sorry.
You have to do essentially what @nicomeunier posted, but with some minor modifications:
- run
nodist npm match global
- open a command prompt (cmd, not powershell) in admin mode and input:
cd C:\Program Files (x86)\Nodist\npmv\9.5.1\node_modules del @npmcli\arborist && mklink /D @npmcli\arborist ..\..\workspaces\arborist del @npmcli\config && mklink /D @npmcli\config ..\..\workspaces\config del libnpmaccess && mklink /D libnpmaccess ..\workspaces\libnpmaccess del libnpmdiff && mklink /D libnpmdiff ..\workspaces\libnpmdiff del libnpmexec && mklink /D libnpmexec ..\workspaces\libnpmexec del libnpmfund && mklink /D libnpmfund ..\workspaces\libnpmfund del libnpmhook && mklink /D libnpmhook ..\workspaces\libnpmhook del libnpmorg && mklink /D libnpmorg ..\workspaces\libnpmorg del libnpmpack && mklink /D libnpmpack ..\workspaces\libnpmpack del libnpmpublish && mklink /D libnpmpublish ..\workspaces\libnpmpublish del libnpmsearch && mklink /D libnpmsearch ..\workspaces\libnpmsearch del libnpmteam && mklink /D libnpmteam ..\workspaces\libnpmteam del libnpmversion && mklink /D libnpmversion ..\workspaces\libnpmversion
Note using
del
instead ofrm
and the new link toconfig
that I guess was added sometime after 8.11.
This worked for me, thanks to everyone that contributed. It's so annoying that we have to do stuff like this just to get npm working!
Has been fixed in v.10.3