DEV Community

Marouane Etaraz
Marouane Etaraz

Posted on

Fix vercel error : A system error occurred: uv_os_gethostname returned ENOSYS (function not implemented)

If you looking for the solution you are probably has windows 7 OS.
all you have to do go to node directory in your system and follow the path :
node_modules->vercel->dist->index.js.

On top of index.js override the system function hostname:

const os=require("os")
os.hostname=()=>"localhost"
Enter fullscreen mode Exit fullscreen mode

Then run vercel again and will work with you

I hope is helped !

Top comments (2)

Collapse
 
xis42 profile image
aproxis

Make sure that the hostname command is working properly on your system. You can check the hostname of your system by running the following command:

hostname
Enter fullscreen mode Exit fullscreen mode

If the hostname command is not working, it could be because it is not installed on your system or because it is not configured correctly.

Check if there are any issues with your network configuration. If the network is not configured correctly, it could cause issues with the hostname command and prevent Vercel from determining the hostname of your system.

If the problem persists, you might want to try reinstalling the hostname command or updating your system.

Collapse
 
daniloocc profile image
Danilo Bezerra

Thank you.
It also happens with fastify on windows 7