Please help me out, I am creating RAG application. My Tech-Stack is NextJS, Convex for storing users data and chat-history. Astra-DB for storing my vectorized data of documents. The problem is I want to connect my Astra-DB to my application under chat.ts which is under convex folder.
Problem is whenever I use node modules to create a connection, convex compiler gives node bundle error. I am attaching error below.
In tsconfig.json of convex I have excluded the node_modules. But still it is trying to bundle it.
tsconfig.json
{
/* This TypeScript project config describes the environment that
* Convex functions run in and is used to typecheck them.
* You can modify it, but some settings required to use Convex.
*/
"compilerOptions": {
/* These settings are not required by Convex and can be modified. */
"allowJs": true,
"strict": true,
/* These compiler options are required by Convex */
"target": "ESNext",
"lib": ["ES2021", "dom"],
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"module": "CommonJS",
"moduleResolution": "Node",
"outDir": "./dist",
"rootDir": "./",
"esModuleInterop": true,
"isolatedModules": true,
"skipLibCheck": true,
"noEmit": true
},
"include": ["./**/*.ts"],
"exclude": ["./_generated", "../node_modules", "dist"]
}
Error:
enter image description here
In tsconfig.json of convex I have excluded the node_modules. But still it is trying to bundle it.
Syed Khizar Rayaz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.