failed to load resource net::ERR_FILE_NOT_FOUND Nodejs

I am in a mind boggling problem, unable to decipher whether or not the way how Windows and Ubuntu manages files had anything to do with socket.io in particular.

I obtained the failed to load resource net::err_file_not_found error when I tried running my Nodejs web application on Windows, however, when I ran it on Ubuntu it went smoothly without a problem. I managed to fix it by changing the src from / to .

Trying to figure out what is the difference in using socket.io dependency in my .html file.

In Ubuntu

<script src="/"></script>

In Windows

<script src=""></script>

Is it the way how socket.io binds around the port when it's listening to the server? or just from where the OS calls the dependencies from?

I found a piece of information from Socket.IO Real-time Web Application Development, page 56.

...."You might be wondering where the / file comes from, since we neither add it and nor does it exist on the filesystem. This is part of the magic done by io.listen on the server. It creates a handler on the server to serve the socket.io.js script file."

However, it doesn't really specify any details between the differences in OS. Very intriguing.

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like