Questions on Quickstart

Hello all,

I just did the Quickstart, but for some reason, I di. not get the result that is expected per documentation. There should be a Packages available, but I did not see anything.

Questions that I have:

  • In npm init there is
    package name: @YOUR-USERNAME/YOUR-REPOSITORY

If I am part of organization, myorganization, is this the right package name:
@laurentiuspurba/myorganization/github-package-test?

  • In package.json
"publishConfig": {
   "@YOUR-USERNAME:registry": "https://npm.pkg.github.com"
 }

Should I type the above as

"@myorganization/laurentiuspurba:regsitry": "https://npm.pkg.github.com"

?

Please advise.

Thanks
Laurent

Hi!

It depends on where you’re trying to publish your package – the owner of the repository is what you want to key off.

If you’re trying to publish to myorganization/myrepo you would name the package @myorganization/myrepo; if you’re trying to publish to myuser/myrepo you’d name the package @myuser/myrepo

For the publish config you’d do similar: either @myorganization:registry or @myuser:registry – the package name is not required in those fields.

Hi @toddself , thanks for your response. I will try them out.

Other thing from that Quickstart, step #10, it says

To test this out, navigate to the Code tab in your repository and create a new release.
For more information, see "Managing releases in a repository."

Is this a simple branch creation and merge it to master/main?

Releases are not necessary to create packages – you can safely ignore that unless you don’t want to!

Releases are not branches but rather additional metadata about your repo at a specific point in its history.

Great. Thanks for the info @toddself . I will try it out and keep you posted.
Really appreciate your help.

Hello @toddself , thanks for all your help. I did what you instructed, and I was able to create that test package. I really appreciate your help.

1 Like