magicseth
magicseth2y ago

Error finding startswith

I'm running npx convex dev:
(base) sethraphael@Seths-MBP padtime % npx convex dev
✖ Error: Unable to push deployment config to https://dusty-caterpillar-550.convex.cloud
400 Bad Request: InvalidModules: Loading the pushed modules encountered the following
error:
Failed to analyze _deps/node/EXWHTTJC.js: Cannot read properties of undefined (reading 'startsWith')
(base) sethraphael@Seths-MBP padtime % npx convex dev
✖ Error: Unable to push deployment config to https://dusty-caterpillar-550.convex.cloud
400 Bad Request: InvalidModules: Loading the pushed modules encountered the following
error:
Failed to analyze _deps/node/EXWHTTJC.js: Cannot read properties of undefined (reading 'startsWith')
4 Replies
ballingt
ballingt2y ago
Did you get a stack trace too? This is an error that can be thrown by the Convex HTTP client when it is constructed with no argument (e.g. when it's constructed with an argument that is an environment variable that isn't defined)
magicseth
magicsethOP2y ago
no ooh I am instantiating convexhttp clients in my server code and perhaps if I get the environment variable too soon, it's not set? that was the issue const address = process.env.CONVEX_URL as string; isn't getting the right thing did behavior change between .16 and .17 there? if I move that to inside of my action it is fine
presley
presley2y ago
Env variables are not and were never defined during deploy time
magicseth
magicsethOP2y ago
I guess I just assumed that it worked like normal environment variables

Did you find this page helpful?