mem-fs-editor
mem-fs-editor copied to clipboard
Error installing dependencies if node version is < 18
Hello, I’m installing a project that uses Node 16.17.0, and currently, upgrading to Node 18 or higher is not feasible.
In this project's dependency tree (not direct dependencies), it installs "mem-fs-editor" which has been working correctly so far. The issue arose when a dependency installed by "mem-fs-editor" called "isbinaryfile", was updated to version 5.0.2, raising the Node engine requirement to ">= 18".
Upon reviewing the dependencies of mem-fs-editor, I noticed that it's specified in the package.json as follows:
"isbinaryfile": "^5.0.0"
https://github.com/SBoudrias/mem-fs-editor/blob/v11.0.0/package.json#L43
This causes the latest version (currently 5.0.2) to be installed, which, as mentioned, requires Node version ">= 18":
error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 18.0.0". Got "16.17.0"
error Found incompatible module.
However, version 5.0.0 of isbinaryfile actually needs Node version “>= 14”, which is why it was working well previously.