I have published a private package in my company as @company/package-name
, I can see it in our github repository.
After that, I did yarn add @company/package-name
in another project and I got:
➤ YN0027: @company/package-name@unknown can't be resolved to a satisfying range
➤ YN0035: The remote server failed to provide the requested resource
➤ YN0035: Response Code: 403 (Forbidden)
➤ YN0035: Request Method: GET
➤ YN0035: Request URL: https://npm.pkg.github.com/@company/name
It is weird, I can publish but I cannot install it. Do you have any idea please?
CodePudding user response:
Looks like yarn is causing issue. followed the below steps and that did the trick.
npm uninstall –g yarn
npm cache clean –force
npx create-react-app my-app
CodePudding user response:
Finally I got the source of errors.
The checkbox Inherit access from source repository (recommended)
was unchecked in the package settings page.
I have enabled it, and now, we can publish (also with --experimental) and also download this new package.
Thank you Trond Glomnes
for your help.