Const require vs. import ? Would there be a problem using require?

Would there be a problem on using const requiere vs. import?

I ask because I have some pages using EJS which is working on the const require format… BUT!!! I am not using EJS all that much, so if it would create problems with OpenAI then I can go with the import format…

I am using a recent version of the OpenAI NodeJS API (v4.3.0 according to package.json).
I also use const OpenAI = require(‘openai’); without any problem.
I guess you can as well go for the import statement.
Have a look at openai/openai-node: The official Node.js / Typescript library for the OpenAI API (
Hope this helps.