#Why can I not import LlmProvider into my OpenAiProvider?
46 messages · Page 1 of 1 (latest)
if we read the error it says the module you are importing from does not export LlmProvider
that's why
because it's not exported
speaking of, what even provides @babadeluxe/shared/types/index cause i cannot find that onlime
it's a npm workspace
so you get LlmProvider from llm-provider.ts
why are you trying to import it from @babadeluxe/shared/types/index
unless @babadeluxe/shared/types/index.js re-exports types llm-provider.ts it can't be imported from @babadeluxe/shared/types/index.js
that's... interesting then
try importing from @babadeluxe/shared/types/index or @babadeluxe/shared/types/index.ts rather than @babadeluxe/shared/types/index.js maybe?
so you are writing in js and manually making .d.ts files?
no but i import ts files with index.js instead of index
if you write in ts you should always import ts and then the transpiler will swap it all to .js for you
or import without extension and let it autoselect the correct extension
the question is if i can get the npm monorepo path
which is the workspace path i guess
in my tsconfig file
maybe i can tell somehow in tsconfig that it should replace the relative path by the workspace folder
that's only a stylistic preference, isn't it?
no it can have some weird effects with some tools as well
hm okay, my tool stack works with the file extensions
can't complain
but it's the first time i have set up a monorepo with npm workspace
the reason i say to try as .ts or no extension is to see if it's just not resolving the .d.ts file
and trying to get types from a js file
my linter doesn't allow this
interesting 
i'm gonna hope someone shows up with more experience then, i'm out of ideas
yeah me too, but thanks anyways
just removed the base file and wrote all in a standalone tsconfig file in the shared package
bingo babe
Dopamine hit achieved
babadeluxe is the company
ooo sounds fun:)
yeah sure haha 🙂
that's coming from the monorepo setup if i understand you right
rn im just making an app called baba deluxe thats why i got curious haha