Dependency error: @valapi/* packages
Drysque opened this issue · 11 comments
Hey! I'm interested in this package because it says it supports MFA
I tried the following command
yarn add @ing3kth/val-api
Which yielded this error:
error Couldn't find package "@valapi/api-wrapper@latest" required by "@ing3kth/val-api" on the "npm" registry.
followed by these errors:
Error: Couldn't find package "@valapi/riot-api@latest" required by "@ing3kth/val-api" on the "npm" registry.
Error: Couldn't find package "@valapi/lib@latest" required by "@ing3kth/val-api" on the "npm" registry.
Error: Couldn't find package "@valapi/riot-client@latest" required by "@ing3kth/val-api" on the "npm" registry.
Error: Couldn't find package "@valapi/valorant-api.com@latest" required by "@ing3kth/val-api" on the "npm" registry.
Also, when I try to visit the npm/package page, I get redirected to the login page, has if I didn't have permissions.
Are the packages private ?
I just publish all packages on Github
yarn --registry https://npm.pkg.github.com
or just use npm
npm --registry https://npm.pkg.github.com
IDK it works or not but try first and reply to me
Thank for the report!
With the --registry https://npm.pkg.github.com
, yarn correctly finds the @valapi/*
dependencies!
But now it cannot find the main package
yarn --registry https://npm.pkg.github.com add @ing3kth/val-api
error Couldn't find package "@ing3kth/val-api" on the "npm" registry.
.npmrc
create .npmrc
Example
- project 1/
- node_modules/
- src /
- package.json
- .npmrc
- project 2/
registry
then put this text to .npmrc
Example
@ing3kth:registry=https://registry.npmjs.org
@valapi:registry=https://npm.pkg.github.com
config
or run this command before install
npm config set "@valapi:registry"="https://npm.pkg.github.com/"
Ok I'll try this
But I'm wondering, isn't this supposed to be done by you in the KTNG-3/valorant-api/.npmrc
, so that anyone that wants to use your project can do it right away without looking for this issue?
probably yes, I just want to try
-
if it works, great
-
if not, I just try another method until getting the best of the best.
What my project looks like
.
├── src/
├── node_modules/
├── package.json
├── .npmrc
└── yarn.lock
.npmrc
@ing3kth:registry=https://registry.npmjs.org
@valapi:registry=https://npm.pkg.github.com
manually set yarn config
~ yarn config set "@valapi:registry" "https://npm.pkg.github.com/"
yarn config v1.22.17
success Set "@valapi:registry" to "https://npm.pkg.github.com/".
~ yarn config set "@ing3kth:registry" "https://registry.npmjs.org"
yarn config v1.22.17
success Set "@ing3kth:registry" to "https://registry.npmjs.org".
result of yarn config
~ yarn config list
yarn config v1.22.17
info yarn config
{
...
'@ing3kth:registry': 'https://registry.npmjs.org',
'@valapi:registry': 'https://npm.pkg.github.com/'
}
info npm config
{
'@ing3kth:registry': 'https://registry.npmjs.org',
'@valapi:registry': 'https://npm.pkg.github.com'
}
install
~ yarn add @ing3kth/val-api
error Couldn't find package "@valapi/api-wrapper" on the "npm" registry.
Error: Couldn't find package "@valapi/lib" on the "npm" registry.
Error: Couldn't find package "@valapi/riot-client" on the "npm" registry.
Error: Couldn't find package "@valapi/riot-api" on the "npm" registry.
Error: Couldn't find package "@valapi/valorant-api.com" on the "npm" registry.
With npm
~ npm config set "@valapi:registry"="https://npm.pkg.github.com/"
~ npm config list
; "user" config from /root/.npmrc
; @valapi:registry = "https://npm.pkg.github.com/" ; overridden by project
; "project" config from /app/.npmrc
@ing3kth:registry = "https://registry.npmjs.org"
@valapi:registry = "https://npm.pkg.github.com"
; node bin location = /usr/local/bin/node
; cwd = /app
; HOME = /root
; Run `npm config ls -l` to show all defaults.
~ npm install @ing3kth/val-api
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR! https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR! npm login
I find a problem when going to npm.pkg.github.com
it says you need to login to GitHub first IDK why but
I change all package paths to NPM.
so delete all hard work and use the default.
Haha ok, thank you for trying, i'll retry with the default way when you push.
Then, i'll close the issue if it works.
A simple yarn add @ing3kth/val-api
does the trick now !
Sorry for the trouble
NP