题意:请求的模块 'openai' 没有提供名为 'Configuration' 的导出错误
问题背景:
I'm trying to build an AI image generating website using MERN and I got this error:
我正在尝试使用 MERN 构建一个 AI 图像生成网站,但遇到了这个错误:
The requested module 'openai' does not provide an export named 'Configuration'.
file:///C:/Users/Rashmika%20Satish/ai_website/server/routes/dalleRoutes.js:3 import {Configuration, OpenAIApi} from 'openai'; ^^^^^^^^^^^^^ SyntaxError: The requested module 'openai' does not provide an export named 'Configuration' at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/es