Node module error in react application using openAI v4.0.0

I’m using npm pacakge of openAI v4.0.0 with node version of 18.16.1

and im facing this error

./node_modules/openai/index.js 63:50
Module parse failed: Unexpected token (63:50)
File was processed with these loaders:

  • ./node_modules/babel-loader/lib/index.js
    You may need an additional loader to handle the result of these loaders.
    | constructor({
    | apiKey = Core.readEnv(‘OPENAI_API_KEY’),
organization = Core.readEnv('OPENAI_ORG_ID') ?? null,

| …opts
| } = {}) {

what should do now , it was working fine in node v14.16.0 but throwing error like this in node v18.16.1