How can I prevent tsup from generating these files with hashes at the end of the name? They only are .d.ts (generated when I set dts: true) and they cause this error in my monorepo when indirectly importing code from them (e.g I import from another file in a separate workspace of my monorepo, but that file imports from the file with the hash):
The inferred type of 'DEFAULT_TOOL_SYSTEM_PROMPT' cannot be named without a reference to '../../../../../node_modules/@langchain/core/dist/prompt-f7938666.js'. This is likely not portable. A type annotation is necessary.ts(2742)
If I manually delete the file it's referencing prompt-f7938666.d.ts then the error goes away.
Does anyone know how I can resolve this issue without adding type annotations?
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
How can I prevent tsup from generating these files with hashes at the end of the name? They only are
.d.ts
(generated when I setdts: true
) and they cause this error in my monorepo when indirectly importing code from them (e.g I import from another file in a separate workspace of my monorepo, but that file imports from the file with the hash):If I manually delete the file it's referencing
prompt-f7938666.d.ts
then the error goes away.Does anyone know how I can resolve this issue without adding type annotations?
Upvote & Fund