#"Could not resolve" Errors _ Datamodel
9 messages · Page 1 of 1 (latest)
@lone tiger we'll need more information, what are you seeing? Please show the error message and the steps you took to get there
[{
"resource": "/Users/pana/Documents/kay/app/lang/convex/convex.config.ts",
"owner": "typescript",
"code": "2742",
"severity": 8,
"message": "The inferred type of 'app' cannot be named without a reference to '@convex/node_modules/convex/dist/esm-types/server/components'. This is likely not portable. A type annotation is necessary.",
"source": "ts",
"startLineNumber": 5,
"startColumn": 7,
"endLineNumber": 5,
"endColumn": 10
}]
I created a convex.config.ts to import some modules : here is my file
import { defineApp } from "convex/server";
import rateLimiter from "@convex-dev/rate-limiter/convex.config";
import migrations from "@convex-dev/migrations/convex.config";
const app = defineApp();
app.use(rateLimiter);
app.use(migrations);
export default app;
i have been asking the chat and spend hours to understand, modifyed the tsconfig, all my ts , convex versions are up to date, i tried everything i could but still get this error message.
i dont want to flood you with message but here are the other error message i got , if that can help , i spent three days removing most of htem, but those are the last : convex/_generated/api.js:23:14 - error TS2742: The inferred type of 'components' cannot be named without a reference to '@convex/node_modules/convex/dist/esm-types/server/components'. This is likely not portable. A type annotation is necessary.
23 export const components = componentsGeneric();
~~~~~~~~~~
convex/convex.config.ts:5:7 - error TS2742: The inferred type of 'app' cannot be named without a reference to '@convex/node_modules/convex/dist/esm-types/server/components'. This is likely not portable. A type annotation is necessary.
5 const app = defineApp();
~~~
convex/sync.ts:188:14 - error TS2742: The inferred type of 'runSync' cannot be named without a reference to '@convex/node_modules/convex/dist/esm-types/server/registration'. This is likely not portable. A type annotation is necessary.
Hi, I'm also getting this error, when I try to use the convex components. i think if you do a next app add convex to it, and then add any of the example convex.config.ts from the documentation like rateLimiter, etc. This is kind of blocking build, maybe I can ignore type check for this file. but defineApp i think returns some sort of AppDefinition, but also, the AppDefinition type might not be exported? could be something else