Charan
Charan7mo ago

Error in source code deployment

The error message i got in terminal is as below: Downloading current deployment state... Diffing local code and deployment state Analyzing and deploying source code... ✖ Error: Unable to push deployment config to https://careful-manatee-130.convex.cloud Error fetching POST https://careful-manatee-130.convex.cloud/api/push_config 400 Bad Request: InvalidModules - I tried by reinitializing project multiple times and the url is changed but still i am facing this issue
7 Replies
Mcnoble
Mcnoble7mo ago
On what platform are you trying to deploy
sshader
sshader7mo ago
Usually there's an error message right below that which is specific to your code. Some examples of what this might be -- an invalid import (e.g. from a typo, or because you haven't npm installed a dependency), using libraries that require node without have "use node" at the top of the file, etc.
Charan
CharanOP7mo ago
Convex cloud and i am using next.js ✖ Error: Unable to push deployment config to https://flippant-stork-992.convex.cloud Error fetching POST https://flippant-stork-992.convex.cloud/api/push_config 400 Bad Request: InvalidModules: Hit an error while pushing: Loading the pushed modules encountered the following error: Failed to analyze openai.js: Uncaught ReferenceError: resources_exports is not defined at <anonymous> (../node_modules/openai/src/index.ts:232:16) at <anonymous> (../node_modules/openai/src/index.ts:220:17) This is complete error message. 1. I checked with openai installation and done it correctly By the way i am using next.js
Mcnoble
Mcnoble7mo ago
I meant hosting platform
sshader
sshader7mo ago
And to check, there's nothing in your code that reference "resources_exports"?
Charan
CharanOP7mo ago
Checked with both the files..still didn't get anything
sshader
sshader7mo ago
If you want to share your openai.ts / openai.js file (I think that's what it's complaining about) either here or over DM, I can take a quick look. We definitely have Convex apps that use the openai npm package, so I believe this should work

Did you find this page helpful?