-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Please open the issue again: "More descriptive errors when used in node.js (include the error line)" #1152
Comments
Thanks for providing some examples, that really helps! Looking into it, the syntax errors are caught at this point in the node.js adapter. However, printing out e.stack did not give line numbers or more details on the syntax error, just the type of stack seen above. The vm.runInThisContext docs indicate stderr may be where that info goes, but I am not sure yet how best to tie into that information. So keeping this open for now for further investigation. Not sure when I will get to it, so happy to have help identifying a fix. |
Thanks for paying attention to such an important problem... This is my main concern about requirejs, and I don't understand how this is only a problem for me. |
@jrburke Anyone already fixed this? |
This seems fixed now without any changes in r.js by using node 0.12, so going to close this out. Unfortunately, there are not enough hooks into vm.runInThisContext in older node versions to get to the information. With node 0.12, I see this sort of error now on the commandline (where test2 had a
|
Please open again: #1067 (comment)
Here is the update and is a real bug:
Hello!
So I should rephrase the problem:
Exemple A (descriptive):
File test.js
File test2.js
Error
Here you can see that the error is at line 2 in test.js, utils is not defined and also shows me the column.
Exemple B (non descriptive):
File test.js
File test2.js
Notice the
?
added beforeutils.generateErrors({
Error
Now please tell me where is the problem? I only know is in the test2 file, but at which line and what exactly is the problem is unknown..
From your example
test2.js
Error
Same problem with your code. Maybe you are not using requirejs like I do, or maybe I do it wrong, I don't know but nowadays I mainly guess what the problem might be or I copy paste the code in the browser, stuff like that just to find the problem, which is a real pain.
I hope you understand the problem better now.
Thanks for your support
The text was updated successfully, but these errors were encountered: