I am working on an already created project and trying to add openai to it. I had been initially informed that node 16 version is to be used but found out later through other devs that everyone is on 14.17.3 and same is used all over the project.
The openai package has require(“node:fs”) syntax in it from where the error originates. I have attached the error which mentioned module not found.
error
Since node 14 can use fs without node: I wanted to know is this an acceptable workaround to my problem or this is dangerous (feels dangerous).older version warning
I tried to go through the older versions of openai package but the earliest 4.0.0 still mentions node 16 as requirement and the versions older than that have a warning attached to it. So my other question would be how to know exactly which version of node will be compatible with which version of openai package. Asking this because when I was using node 16 and installed openai the version was latest and in their the requirement mentioned is 18 so it still works with 16. So would that be the case when finding 14 compatible version as well.
latest requirement
I need to know if what I am doing isn’t downright stupid.
Also I want to know how to actually find which exact version of node will work with certain packages as even though using older version of node packages do work.
HighOnJalapenos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.