Closed kasir-barati closed 6 hours ago
Please note that it works. My problem with it is that I had to use // @ts-ignore
and I wanna avoid using it AMAP.
Your TypeScript is configured as if you're still back in Node14 (or before) land. Please consider extending from a modern TypeScript configuration, e.g.:
{
"extends": "@tsconfig/node20/tsconfig.json"
}
The actual setting that is incorrect is the moduleResolution
setting, which needs to be updated to node16
or nodenext
; we don't have docs for that in Ruru yet but it's equivalent to these PostGraphile docs:
https://postgraphile.org/postgraphile/next/requirements#typescript-v500-optional
Thanks for linking the official doc so that I can learn more about this. I guess then this was an oversight on my end. I am gonna close this since I thought it is something related to pnpm/nx.
Summary
I use pnpm everywhere and when I install ruru like this
pnpm add ruru
and try to import it I get this error message in my terminal when it tries to build it and in my IDE as well. It looks to me there are some issues with types exported fromruru
.Steps to reproduce
Clone this repo and remove
// @ts-ignore
here: https://github.com/kasir-barati/graphql/blob/0a1b9b7f822798f9a8d8449c73bd6e5fc5d932ae/apps/expressjs-hello-world/src/main.ts#L4Expected results
Just work like you should
Actual results
Additional context
I am using Nx and it is a monorepo. I am building it with esbuild.
Possible Solution
Maybe add some types over there.