Resolving TypeScript Errors After Configuring Node.js Subpath Imports in Shared Package
I am trying to create a shared package in which I will put a bunch of effect utils that I am re-using accross similar projects (such as schemas).
A bit of context before explaining my issue:
In my shared package I am using Node.js subpath imports, such as (but not exactly like):
Everything was working fine, however I realized that, on top of my
This caused an issue since the subpath imports was now misconfigured. Until then, when importing a schema like:
I fixed that. But now that this is fixed I have typescript flagging error on every schema using my shared packaged schemas.
For example :
Is working fine.
However when I try to use it from my shared package
I get this error:
Which brings me to my question:
1. Wtf am I doing wrong aha ?
2. When trying to share schemas (or anything else) through shared published packages, isn't it the way to proceed ?
A bit of context before explaining my issue:
In my shared package I am using Node.js subpath imports, such as (but not exactly like):
Everything was working fine, however I realized that, on top of my
./dist folder, I was also publishing my non compiled dir. So I modified my configuration so that I only publish my ./dist folder.This caused an issue since the subpath imports was now misconfigured. Until then, when importing a schema like:
import { SomeSchema } from "@somepackage/someSchema" was actually pointing to the initial .ts and not the compiled ones.I fixed that. But now that this is fixed I have typescript flagging error on every schema using my shared packaged schemas.
For example :
Is working fine.
However when I try to use it from my shared package
I get this error:
Which brings me to my question:
1. Wtf am I doing wrong aha ?
2. When trying to share schemas (or anything else) through shared published packages, isn't it the way to proceed ?
