For starters, I am a complete novice when it comes to web development, so I apologize first for likely lacking appropriate information. Any discussion will be helpful so I can get a better idea of how Node.JS and live-server work.
I am attempting to debug a app.js file I wrote, with the following steps:
- In VSCode; deploying to live-server localhost, port 5500.
- Launching Microsoft Edge on localhost, port 5500.
I can successfully hit my breakpoints in the (app).js file, provided below (as one line). On Edge, it exits unsuccessfully on this line:
var express = require('express');
Unfortunately, I can't seem to get more information on what's causing the failure. Some additional information of my own:
- I did
npm install expressand can find theexpressfolder in mynode_modules, but when hovering over therequirefunction, I see a different path to my Local AppData folder. I also triedrequire('../node_modules/express/index')directly, but that also exited unsuccessfully. - The file does run succesfully if I call it directly with
node app.js, which confuses me what the difference between this function and what Edge does.
I'm sure there's something I neglected to mention, so please let me know!
I tried using NodeRequire in Node.JS while launching to Microsoft Edge. I was expecting this to work like when I called it directly with node app.js, but it instead exited unsuccessfully.