Uncaught TypeError: Failed to resolve module specifier “openai”. Relative references must start with either “/”, “./”, or “…/”.
1 Like
Hi Immanuel, can you share the code snippet where the error occurs?
I am getting the same error - I simply try to import the lib into a js file like so:
import { Configuration, OpenAIApi } from 'openai';
and get the same error as the OP
That is typical of not installing the OpenAI library, what operating system is this running under? and have you installed the OpenAI libraries? Guide here https://platform.openai.com/docs/quickstart