I faced the same error. To resolve it, I first ran “npm uninstall openai” , followed by “npm install [email protected]"