reactjsnpmnpm-installyarnpkgyarn-workspaces

unable to install npm package from github


I use a workspace into my app

  "workspaces": [
    "firstapp/web",
    "secondapp"
   ]

Into second app, into package.json I get into dependencies:

"anotherapp": "https://github.com/me/anotherapp.git",

From root I run yarn workspaces foreach -Apt install everething is ok

I run yarn workspaces foreach -Apt build but get Cannot find module 'anotherapp' or its corresponding type declarations.

I get this both in CI and during dev (on local)

I don't know what is wrong

If I import my anotherapp as "anotherapp": "../anotherapp" on local it's working. So I don't know how to fix it.


Solution

  • I fix it , deploying my package to npmjs