adding an http router makes undeployable
If I add an http.js file that just exports the router with no routes added in specific, I'm seeing errors. I'm not sure why though because it seems to be upset about other functions, but those are able to deploy when the http.js file isn't present, and these aren't called in the http file as yet. Error screenshot below:
11 Replies
@Joe what's your http.js file look like? Are you using TypeScript or JavaScript?
.js file looks like this
i tried taking everything out but get errors
@Joe are you using JavaScript files everywhere else?
i had crons.ts but that was it, if i change that to crons.js still fails i think, only other .ts file is schema
the
httpRouter
import looks odd, I don't think there is a httpRouter in ./_generated/server
ah ok, i think i pulled that from here: https://docs.convex.dev/api/classes/server.HttpRouter
Class: HttpRouter | Convex Developer Hub
server.HttpRouter
is there another way to write ?
Oops, thanks for the docs bug report
ah tyyy - lemme try that
works thanks!
We should improve the error message when this happens.