`Cannot find module 'rollup/parseAst' or its corresponding type declarations.`
I just upgraded from Convex
1.5.1
to 1.6.3
and I'm now getting the following error when running convex dev
:
Any clue why this might be/how to resolve it?8 Replies
looks like this is the Convex typecheck trying to find rollup. I wonder why it wants this. Is this the only change? I'll look through our changes.
Would you try
- doing a push skipping the typecheck: does that work?
- running
npx tsc --project convex --explainFiles
and looking how Vite gets in here
hm I dont' see anything that I can imagine affecting thisPushing without typechecking appears to succeed
@RJ Did you upgrade Vite at the same time? I see https://github.com/vitejs/vite/issues/15112
of the three suggested fixes, I know
skipLibCheck: true
in the convex/tsconfig.json would work. moduleResolution: 'bundler'
is the "right" one to use I think, but it would be a bigger change.Hmm,
vite
isn't a direct dependency of my project, but I had also updated Remix from 2.3.x
to 2.4.0
, and I know they have integration with Vite as beta feature in v2, so perhaps that also led to Vite being upgraded?
(as a dependency of Remix)hm I see
Support Vite 5 (#7846)
in Remix 2.3, nothing quite sounds relevant in 2.4
if node_modules/vite/package.json
says 5 this sounds lke this issue, we see enough libraries that suggest skipLibCheck: true
as the workaround that we don't rely on it working correctlynpm why vite
produces:
Setting "moduleResolution: "Bundler"
in my Convex tsconfig.json
seems to work fine 🤷♂️
Is there any reason I shouldn't go with that?That's great, that's we'd like to move to. It's a large change from
"moduleResolution": "node"
because it means now TypeScript actually uses exports field in package.json to locate types when traversing dependencies, so it's possible one of your other dependencies would have this broken.Ah, I see!
Good thing I only allow the finest dependencies into my Convex codebase 🥂
But anyways glad that works, thanks for your help @ballingt!