DEV Community

loading...

Discussion on: Publishing and Installing Private GitHub Packages using Yarn and Lerna

Collapse
hollg profile image
Gary Holland

Has the package been published to a repository belonging to you? E.g. mygithubusername/project-a containing @mygithubusername/package-a.

Yep, that's right

Does your local clone of the repository in which you want to yarn add @mygithubusername/package-a (e.g. mygithubusername/project-b) contain a .npmrc file that looks something like this?

It sure does!

Just to give you full context:

I'm working in a private repository hosted on my github account, with this setup:

client
    some stuff
    some other stuff
server
    even more stuff
packages
    shared-types

client and server have their own package.jsons managing their own dependencies, builds etc. But I want to share some TypeScript types between them. That's what shared-types is for. So I'm trying to yarn add it to client and server.

Thanks so much for taking the time to look into this with me!