learn-a icon indicating copy to clipboard operation
learn-a copied to clipboard

Module not found.

Open ccorcos opened this issue 7 years ago • 3 comments

In pkg2, I'm getting [ts] Cannot find module '@ryancavanaugh/pkg1'. unless I run tsc -b packages. This is a little annoying... I suppose you aren't supposed to work on both packages at the same time? Or just use --watch to constantly rebuild...

Also, would be nice if I could import specific files from these packages... Should I import directly from the "@ryancavanaugh/pkg1/src/*'?

ccorcos avatar Aug 13 '18 23:08 ccorcos

This example is based on Lerna, do you know how it works? You have to do only 3 steps from the root directory:

  1. yarn install
  2. yarn bootstrap
  3. yarn build

or for DEV mode yarn dev

No need to build each pkg[n] directly as you maybe doing it.. After that 3 steps you can easily import @ryancavanaugh/pkg1 or @ryancavanaugh/pkg2 or @ryancavanaugh/pkg3

eshimischi avatar Aug 14 '18 13:08 eshimischi

Hello Inside pkg3 I'm getting Cannot find module '@ryancavanaugh/pkg2'. How to fix it? Inside index.ts from pkg1 & pkg2 everything is good.

stherrienaspnet avatar Oct 12 '18 23:10 stherrienaspnet

https://github.com/Izhaki/mono.ts

I believe it does what you're after.

Izhaki avatar Dec 29 '18 00:12 Izhaki