Type error during 0.17 upgrade
I'm currently upgrading to 0.17, and am seeing the following error whenever I try to alter my Convex functions to use the new reference strategy:
Happy to provide more info as helpful, but any clue what might be going on?
4 Replies
I think you maybe had a
"path/to/foo" that was changed to api.path.to.foo instead of api.path.to.foo.default?Ohh, so now I need to append "default" in the case where the function is the default export of the file in that path?
Yep exactly.
Definitely a little awkward, so we rewrote a bunch of our examples to use named exports instead (e.g.
api.messages.list instead of api.listMessages.default). I think we've looked in to avoiding the .default, but it gets tricky with support jump to definition in vscode.It definitely makes sense that you'd need some way to disambiguate, since you lost the
/ vs : distinction
I don't have any good ideas either, but it's not too big of a deal either IMO
Thanks @sshader!