magicseth
magicseth2y ago

can't find getFunctionName at runtime

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/convex_server.js?v=a61df928' does not provide an export named 'getFunctionName' (at convexvue.ts:8:3)
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/convex_server.js?v=a61df928' does not provide an export named 'getFunctionName' (at convexvue.ts:8:3)
6 Replies
ballingt
ballingt2y ago
hmmm it should? is convex_server the correct thing here, the import should look like import { getFunctionName } from "convex/server";, maybe convex_server just how Vite transforms that
magicseth
magicsethOP2y ago
I copied the definitions over, and then got this function missing anyApi
ballingt
ballingt2y ago
anyApi comes from convex/_generated/api
magicseth
magicsethOP2y ago
/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* Generated by convex@0.17.1.
* To regenerate, run `npx convex dev`.
* @module
*/

import { anyApi } from "convex/server";
/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* Generated by convex@0.17.1.
* To regenerate, run `npx convex dev`.
* @module
*/

import { anyApi } from "convex/server";
somehow it seems like vite isn't including everything?
ballingt
ballingt2y ago
There should be an export line there too
export const api = anyApi;
export const api = anyApi;
magicseth
magicsethOP2y ago
yes there is on the next line but I'm not using anyApi anywhere This was fixed by upgrading vite

Did you find this page helpful?