Troubleshoot issues within ExpressJS

I am encountering an issue with the debugger in Visual Studio Code. It crashes upon startup, but runs smoothly when using nodemon to start the server.

My application is connected to a MySql Database. I have attempted to reinstall the module without success.

The error specifically occurs in loaders.js at the line: mod = getInternalBinding(module)

let internalBinding;
  {
    const bindingObj = ObjectCreate(null);
    internalBinding = function internalBinding(module) {
      let mod = bindingObj[module];
      if (typeof mod !== 'object') {
        try {
          mod = getInternalBinding(module);
        } catch {
          // v10.x only: Fall back to `process.binding()`,
          // to avoid future merge conflicts when backporting changes that use
          // `internalBinding()` to v10.x.
          mod = process.binding(module);
        }
        bindingObj[module] = mod;
        moduleLoadList.push(`Internal Binding ${module}`);
      }
      return mod;
    };
  }

Exception has occurred: Error
Error: No such module: http_parser.   
    at internalBinding (internal/bootstrap/loaders.js:104:17).   
    at _http_client.js:27:24.   
    at NativeModule.compile (internal/bootstrap/loaders.js:362:7).   
    at NativeModule.require (internal/bootstrap/loaders.js:174:18).   
    at http.js:25:27.   
    at NativeModule.compile (internal/bootstrap/loaders.js:362:7).   (internal/bootstrap/loaders.js:174:18)    
    at Function.Module._load (internal/modules/cjs/loader.js:517:25).  
    at Module.require (internal/modules/cjs/loader.js:637:17)   
    at require (internal/modules/cjs/helpers.js:22:18)

Answer №1

To solve the issue in Visual Studio Code, navigate to the Debug view and locate the breakpoints section at the bottom. Simply deselect the options for 'All Exceptions' and 'Uncaught Exceptions'.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is the file corrupt using node.js?

Looking for ways to determine if a file is corrupted using node.js? I have attempted various File System methods, such as fs.readFile, fs.open, and fs.access, but all of them are showing an OK status. However, I am confident that my file is corrupted base ...

Utilize a directive to showcase information stored within the scope

Struggling to grasp the concept of directives and encountering a bug along the way. To see my example in action, check out the codepen I've created here In my scope called "movies," I have 3 movie titles that I want to display using a directive. va ...

Display or conceal toggle in ruby utilizing jQuery

I'm facing an issue with the functionality of a button that is meant to hide and show a form using jQuery. Initially, I added a path to signup in the button so that it would display and function properly. Now, when I click the button, the form shows u ...

Can an HTML DOM object be converted to a JSON string using JSON.stringify in JavaScript?

Trying to fetch an external HTML file and convert its body content into a string has been giving me unexpected results. Is there a way to achieve this successfully? var xhr = new XMLHttpRequest(); function loadFile(){ xhr.open("GET", 'index.html ...

eliminate several digits past the decimal place

I thought this would be a simple task, but I'm completely stuck with the code I currently have! https://i.sstatic.net/Y36Cg.png render: (num) => { return <span><b>{num.toFixed(2)}</b>%</span>; // rounding to two de ...

What is the best way to access JSON stringified objects in PHP?

I recently used the following code snippet to send data to the server, but now I'm stuck on how to retrieve the array that was returned using PHP. Any suggestions would be greatly appreciated. $('.ticket-row').each(function() { tickets.push ...

error encountered when working with date arrays in JavaScript

I find myself perplexed by this particular issue. Although the following code snippet appears to function correctly, it exhibits some peculiar behavior. var tmpcurdte = eval(dataSource[i].startDate); tmpcurdte.setDate(tmpcurdte.getDate() + 1); while (tm ...

Controlling dropdown menus filled with AJAX responseData

When it comes to Javascript, JQuery has always been a reliable companion for me. However, there are instances where I encounter challenges that require some extra effort to overcome. Today happens to be one of those days. I've stumbled upon an issue t ...

"The loop functionality appears to be malfunctioning within the context of a node

Below is the code snippet: for (var j in albums){ var album_images = albums[j].images var l = album_images.length for ( var i = 0; i < l; i++ ) { var image = album_images[i] Like.findOne({imageID : image._id, userIDs:user ...

Encountering a problem while attempting to restrict access to an Angular application to only the login page, with the help of express-j

I have a custom-built Angular and Express application. My goal is to restrict access to the Angular part of the app unless a user is authenticated. I am using JWT (JSON Web Tokens) to determine if a user has permission to view the content, with an exceptio ...

The failure within the internal request resulted in the failure of the main request

I develop a Jquery Promise with the following structure: request1() .then(response => {}) .then( () => { request2().done(response => {}) } .fail(err => {}); In the done and fail blocks, I implement code to "unblock" the scre ...

Exploring cookies to extract and display my email using Express.js

I am currently working on retrieving the name and value fields as cookies through a loop in my app.get method, then posting the field values in the app.post method using expressjs. I would appreciate it if someone could review the 'for loop' bel ...

JavaScript: Activate the element with the first class of its children

This code is a visual representation of what I'm trying to accomplish... <style> .red{background:red} .blue{background:blue} </style> <div id=test> <button>1</button> <button>2</button> </div> ...

Angular encountered an issue while attempting to access the property 'results' of an undefined value

I've got the code functioning perfectly, but for some reason I'm not getting any errors in the console log. It seems like I can't access results from an indefinite property. Any ideas on what could be causing this issue? I'm trying to m ...

Tips on transforming a JSON file into a response for my personal server

After successfully converting an Excel file to JSON format using my code, I encountered a challenge when trying to convert this as a response. Despite attempting to use res.send in the JS code, it only displayed directory/inner codes instead of a response. ...

Exploring the Dynamic Connection: AngularJS and MongoDB

As someone who is new to MEAN stack, I am currently working on creating a simple one-page application. My goal is to connect to MongoDB and retrieve values from a specific collection using a controller. During my search for an answer, I stumbled upon this ...

Troubleshooting: Issue with Vue-Router failing to load component

I have been in the process of developing a website using Vue and Vue-Router locally. Upon completion, I push my changes with git to the production server which updates the site files. Recently, I encountered an issue with a payment status page that is wor ...

Unveiling the Secrets of Encoding and Decoding JSON within a Concealed HTML

I am in the process of creating a unique control using HTML and JQuery that will showcase a specific text value. Users will have the ability to input various key/value pairs. Here is the current code snippet I am working with: <input id="keyValue" type ...

Utilizing Express and Mongoose to Populate Information from an Array of Objects

I am looking for a way to send a name and an array as a response to a handlebar page. I aim to showcase the data in a table, Utilizing Mongoose Model const Bank = new Schema({ sBankName: String, sBranch: [ { sBranchName: String, sBra ...

tips for incorporating async/await within a promise

I am looking to incorporate async/await within the promise.allSettled function in order to convert currency by fetching data from an API or database where the currency rates are stored. Specifically, I want to use await as shown here, but I am unsure abou ...