ai icon indicating copy to clipboard operation
ai copied to clipboard

`dev` script infinititely recompiles

Open juliusmarminge opened this issue 1 year ago • 3 comments

Description

In root of this monorepo, I tried running dev on the package using:

pnpm turbo dev --filter ai

However that causes tsup to just infinitely recompile itself: https://github.com/vercel/ai/assets/51714798/0d70d9e7-6c16-41e6-bf53-ce25a81b3f39

What's the recommended way to develop in this monorepo? There's no contributing guide?

Code example

No response

Additional context

No response

juliusmarminge avatar Mar 03 '24 22:03 juliusmarminge

We need to write a contributing guide, but I run pnpm build in packages/core, then modify the package.json of an example to "ai": "workspace:*" to have it use the local version.

MaxLeiter avatar Mar 04 '24 00:03 MaxLeiter

@juliusmarminge Personally I tried downgrading/upgrading tsup locally, as it seems to be an open issue with tsup but it didn't help. What I did end up doing is running pnpm clean inside of packages/core and only then running pnpm dev, not ideal but it is working.

alonzuman avatar Mar 04 '24 11:03 alonzuman

i think it's to do with the watch patterns since this repo doesn't use a src/ directory and dist/ to separate out the source from the compiled one. maybe if you're diligent about it and tell tsup exactly what to watch and not it'll fix it

juliusmarminge avatar Mar 04 '24 13:03 juliusmarminge