-
Notifications
You must be signed in to change notification settings - Fork 68
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
It's horrible to see an error Module Not Found, but actually it is just a warning #71
Comments
This seems like a fine change. I'd make it conditional based on code 'MODULE_NOT_FOUND', and I might add a note indicating that we did expect the provider to be found on this system. (We already skip the message entirely on systems where we don't expect the module to have been built.) |
Great!! Thank you. |
A module I am using,
I have removed the console messages locally, but perhaps console-ing to the end user is not the best way to signal error to the developer. Perhaps exposing an event, or even just throwing an exception which can be caught, would be better? I am not sure. But the current behaviour I think is not great. Thanks! |
To be clear: error -> warning is not sufficient, I think you should not be using console at all. (Or perhaps the module |
@mmocny The message is reporting that you're on a platform that appears to support DTrace, but the DTrace binding is not present. Was there a build failure leading up to this? |
I don't recall a build failure, but I may just have missed it. Another user did report one in tmijs/tmi.js#93. That said, I think I've misplaced blame here. I think module I have removed dtrace-provider from local node_modules and bunyan continues to work fine. I'll file an issue with them. (I am assuming dtrace is needed only for debugging and not for releases?) |
DTrace is not needed at all, but it's intended for releases (arguably even more than development, since there are many more options available in development). |
Thanks for that background! Looks like some users have resolved this issue by just re-installing node_modules: trentm/node-bunyan#361. I've just done that, and it hasn't been resolved. Looking at the logs, there is indeed a failure, but seemingly only for v.0.5.0:
Perhaps one of the modules is being too restrictive in its version requirements and needs to upgrade. I'll try that later. Thanks for the responsiveness! |
Changing Was there a known build issue for v0.5 for OSX? |
Yeah, i've just spotted this issue when using Would be nice to have this error a little more user friendly if it's not a fatal error. |
I am suppressing these messages with dirty hack like this ...
|
I think this duplicates #41. Let me know if not. |
@mmocny how do you tell bunyan to use a diff version of Dtrace? thx |
On https://github.com/chrisa/node-dtrace-provider/blob/master/dtrace-provider.js#L26
the errors are looking like the followings:
{ [Error: Cannot find module './build/Release/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
I suggest to change the line to the following
Since Module Not Found is usually a fatal error, and it would be nice to tell the user that it is just a warning.
The text was updated successfully, but these errors were encountered: