Open MAvalleza opened 4 years ago
You need to be logged in to the GitHub Package registry to fetch the package.
try this:
$ npm login --registry=https://npm.pkg.github.com --scope=@geospoc
$ npm install
Hi,
Thanks for the maintaining the package, am finding it very useful.
Is there any chance of publishing to public package to simplify deployments etc?
Thanks in advance,
@razza12 thanks for the kind words!
This is a public package!
Instead of using npm
as package registry, we are using GitHub package registry
if you add a .npmrc
like this in your project root directory, your deployments will be simplified:
registry=https://registry.npmjs.org
@geospoc:registry=https://npm.pkg.github.com
Hope the solution to this issue be posted in the readme. Took me some time before I found this issue.
Have to agree with @razza12, is there some practical reason not to host it on npm? Having developers generate a github Personal Access Token just to download a public package is highly irregular. It also excludes people who may not have or can't have a github account (e.g. embargo).
For those who are wondering who do have a github account and are still wondering what you need to do:
In your .npmrc:
//npm.pkg.github.com/:_authToken=[GENERATED GITHUB PERSONAL ACCESS TOKEN]
registry=https://registry.npmjs.org
@geospoc:registry=https://npm.pkg.github.com
Where [GENERATED GITHUB PERSONAL ACCESS TOKEN]
is the token generated here:
https://github.com/settings/tokens/new
Required permissions:
public_repo
read:packages
Getting permission denied, i am using a PAT with both of those permissions..
I tried installing this in my project but it seems that the
@geospoc/v-mapbox-geocoder
does not exist.Here are the logs: