DurtyFree / alt-V-NativeUI

NativeUI for GTA V alt:V Multiplayer mod written in Javascript / TypeScript
https://altv.mp/
Apache License 2.0
48 stars 26 forks source link

npm install --save @durtyfree/altv-nativeui not working #7

Closed strange2x closed 3 years ago

strange2x commented 4 years ago

When i tried getting the package from npm its showing the error

npm ERR! code E401 npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"

Can you help me get this sorted?

DETAILED LOG

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'install', 1 verbose cli '--save', 1 verbose cli '@durtyfree/altv-nativeui' 1 verbose cli ] 2 info using npm@6.14.8 3 info using node@v14.13.0 4 verbose npm-session a7e716d79c83a96c 5 silly install loadCurrentTree 6 silly install readLocalPackageData 7 http fetch GET 401 https://npm.pkg.github.com/@durtyfree%2faltv-nativeui 459ms 8 silly fetchPackageMetaData error for @durtyfree/altv-nativeui@latest Unable to authenticate, need: Basic realm="GitHub Package Registry" 9 timing stage:rollbackFailedOptional Completed in 4ms 10 timing stage:runTopLevelLifecycles Completed in 662ms 11 verbose stack Error: Unable to authenticate, need: Basic realm="GitHub Package Registry" 11 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:107:17 11 verbose stack at processTicksAndRejections (internal/process/task_queues.js:93:5) 12 verbose statusCode 401 13 verbose pkgid @durtyfree/altv-nativeui@latest 14 verbose cwd D:\Acer\Desktop\altv-server(1) 15 verbose Windows_NT 10.0.19041 16 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--save" "@durtyfree/altv-nativeui" 17 verbose node v14.13.0 18 verbose npm v6.14.8 19 error code E401 20 error Unable to authenticate, need: Basic realm="GitHub Package Registry" 21 verbose exit [ 1, true ]

When i tried accessing 'https://npm.pkg.github.com/@durtyfree%2faltv-nativeui', its asking for username and password, which causing it to get unauthorized.

Firjens commented 3 years ago

I have the same problem

FDiskas commented 3 years ago

create a file .npmrc and add github token with read only on github packages

//npm.pkg.github.com/:_authToken=<github_token>
@durtyfree:registry=https://npm.pkg.github.com
DurtyFree commented 3 years ago

This is because the package is hosted at github, pls refer to FDiskas message. Thx