Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message property contains call stack information in Node 12 #27388

Closed
AlexKamaev opened this issue Apr 24, 2019 · 2 comments
Closed

Error message property contains call stack information in Node 12 #27388

AlexKamaev opened this issue Apr 24, 2019 · 2 comments
Labels
module Issues and PRs related to the module subsystem. question Issues that look for answers.

Comments

@AlexKamaev
Copy link

Hello
Starting from Node version 12 the Cannot find module error contains stack information inside of a message property.
However, in the 10 version the error message didn't contain the stack information in the message property.
Will this inconsistency be fixed?
You can easily reproduce it by the following code:
 

try {
    require('non-existing-module')
}
catch (err) {
    console.log(err.message);
}

My console output:

Cannot find module 'non-existing-module'
Require stack:
- D:\Projects\testcafe\non-existing-module.js

 
Node version 12
Windows 64

@BridgeAR
Copy link
Member

This is an intentional semver-major change. See #25690

Is there any issue around this? It should improve debugging overall.

@BridgeAR BridgeAR added module Issues and PRs related to the module subsystem. question Issues that look for answers. labels Apr 24, 2019
@AlexKamaev
Copy link
Author

There is no issue. Thank you for your information and for pointing out to the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Issues and PRs related to the module subsystem. question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests

2 participants