Error deploying on Render
error TS5055: Cannot write file '/opt/render/project/src/convex/_generated/api.js' because it would overwrite input file.
error TS5055: Cannot write file '/opt/render/project/src/convex/_generated/server.js' because it would overwrite input file.
error TS6059: File '/opt/render/project/src/convex/_generated/api.js' is not under 'rootDir' '/opt/render/project/src/src'. 'rootDir' is expected to contain all source files.
The file is in the program because:
Matched by default include pattern '*/'
error TS6059: File '/opt/render/project/src/convex/_generated/server.js' is not under 'rootDir' '/opt/render/project/src/src'. 'rootDir' is expected to contain all source files.
5 Replies
Here is my package.json
"scripts": {
"start": "node dist/index.js",
"dev": "nodemon --watch src src/index.ts",
"build": "tsc"
},
What does your tsconfig.json have in it?
There are a few things wrong here, does this work locally?
Since you're running this in Node.js you'll want to choose one of these strategies: https://docs.convex.dev/client/javascript/node
Node.js | Convex Developer Hub
Convex supports point-in-time queries (see
What do you expect your build command, tsc, to do? Based on the start command it looks like you expect it to compile code to dist/index. If that's the case, the outDir in your tsconfig.json should be dist.
Yeah this is working fine locally
nevermind i resolved it i think