How to fix "Error: Cannot find module 'node:fs'" while trying to host your backend server on render.

While trying to host your server on render for the first time, you might face this particular frustrating error when your project is building on the render platform. The annoying thing is your project will likely run fine on your local machine but render might keep bringing this error and preventing you from moving forward.

This is a very common error, it happens because render's default node version is different from your project node version. One easy way to fix it is by specifying the node version of your project in the package.json file like this:

By adding the engine in the package.json and specifying the node to be version 18 or above the error will no longer appear on render.