enter image description hereWhy after installing node.js, an error like that occurs after I run the code of various javascript commands, it seems it's not because the code is an error but because node.js doesn't want to connect to the server.
enter image description hereWhen I tried to check whether node.js was connected to localhost or not, it turned out it wasn't connected, so how do I get node.js to connect to 127.0.0.1:300?
documentis a predefined global on browsers. The Node.js environment doesn't have that global, because it's not a browser.Live Serverextension in VS Code and runindex.htmlusing Live Server. It will openindex.htmlfile in browser. Ifindex.jsfile connected toindex.htmlfile then you will see value ofxin browser console.