#Why can I not import LlmProvider into my OpenAiProvider?

46 messages · Page 1 of 1 (latest)

analog walrusBOT
#

-# TypeScript @stuck frost @trail yew
-# Node.js/Bun JavaScript @stuck frost @trail yew

trail yew
#

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

light elm
#

it's a npm workspace

trail yew
#

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

light elm
#

It seems like the relative path fails

#

to the base config after installing the build

trail yew
#

try importing from @babadeluxe/shared/types/index or @babadeluxe/shared/types/index.ts rather than @babadeluxe/shared/types/index.js maybe?

light elm
#

i have file extensions with js

#

because of the es6 build

#

in the compileroptions

trail yew
#

so you are writing in js and manually making .d.ts files?

light elm
#

no but i import ts files with index.js instead of index

trail yew
#

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

light elm
#

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

light elm
trail yew
#

no it can have some weird effects with some tools as well

light elm
#

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

trail yew
#

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

light elm
#

my linter doesn't allow this

trail yew
#

interesting ThinkingHmm

#

i'm gonna hope someone shows up with more experience then, i'm out of ideas

light elm
#

yeah me too, but thanks anyways

light elm
#

just removed the base file and wrote all in a standalone tsconfig file in the shared package

#

bingo babe

swift otter
#

Dopamine hit achieved

jagged vine
#

are you also working on the baba deluxe app?

#

who's baba deluxe then?

light elm
#

babadeluxe is the company

jagged vine
light elm
#

yeah sure haha 🙂

jagged vine
#

is it an office computer?

#

or you js have yo company name there cuz its work stuff?

light elm
#

that's coming from the monorepo setup if i understand you right

jagged vine
#

rn im just making an app called baba deluxe thats why i got curious haha