Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Configuration is not a constructor in server.js when using OpenAI API #3

Open
Deafveloper opened this issue Aug 9, 2024 · 0 comments

Comments

@Deafveloper
Copy link
Owner

While attempting to deploy the backend of the Tom Riddle’s Diary project on Render, a TypeError: Configuration is not a constructor encountered in the server.js file. This error occurs when instantiating the Configuration class from the OpenAI package.

Steps to Reproduce:

1.	Deploy the project on Render using the provided server.js file.
2.	Observe the deployment logs where the following error is thrown:
	- TypeError: Configuration is not a constructor
3.	The error occurs at the line where the Configuration class is instantiated.

Expected Behavior:

The Configuration class should be correctly instantiated, allowing the server to start and handle requests to the OpenAI API without errors.

Actual Behavior:

The server fails to start, and the above TypeError is thrown, preventing the application from functioning correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant