Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn workspaces and yarn link

I have a workspaces project like so:

/project
  - package.json
    /packages
       /project-a
          package.json
       /project-b
          package.json

project-b depends on project-a. Inside workspaces everything is running fine. Now I want to use project-b inside another (new) npm project. Normally yarn link would work, but because of the dependency on project-a this will not work. Is there a correct way to do this?

I've tried yalc and publising to npm which both work, but I like to know if there's an alternate lerna/yarn/npm solution I am not aware of.

like image 642
Dennie de Lange Avatar asked Feb 08 '18 09:02

Dennie de Lange


1 Answers

I am using verdaccio for this now; https://github.com/verdaccio/verdaccio Verdaccio allows to create a local npm registry.

like image 194
Dennie de Lange Avatar answered Oct 11 '22 15:10

Dennie de Lange