I was debugging my nodejs app in vs-code without errors, but suddenly it did begin to give this 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:363:7)
at NativeModule.require (internal/bootstrap/loaders.js:174:18)
at http.js:25:27
at NativeModule.compile (internal/bootstrap/loaders.js:363:7)
at Function.NativeModule.require (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)
Actually the app works successfully, for example, express-js
http functions work as expected, but i am unable to do debugging.
http-parser
Edit: Node Version: v10.14.2, there is no extensions installed, just the vs-code built-in debugging runtime. After i have inspected more, the execution was coming to the loader.js and was terminating afterwards.
Edit2: Renaming the project folder fixed the issue but why? Could anybody explain this?
The code ENOENT means that npm fails to open a file or directory that's required for executing the command. The npm start command is used to run the start script in the package. json file.25-Jun-2022.
Error.captureStackTrace() A non-standard V8 function that creates the stack property on an Error instance.
Runtime errors occur whenever something unexpected occurs in your application, and they often lead to catastrophic issues that can crash your program. Like many languages, Node. js provides a mechanism to anticipate errors before they occur.
What version of node.js and vs code are you debugging?
Some Solutions:
1.Try to rename the project folder
2.Disable extensions and see which extension is influencing the debugging
3.You could also disable the check boxes
All Exceptions and Uncaught Exceptions under Debug > Breakpoints, can debug your application check if it works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With