-
Notifications
You must be signed in to change notification settings - Fork 156
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
Running code through lsc with --map will cause an error #830
Comments
last I knew of, node did not out of the box do source map transformations on your stack traces. I just did a search and this may be what you're looking for to solve your problem. |
Thanks, but I am already doing that. It indeed is necessary for source maps to work for stack traces. And it does work, if I first compile to a .js file, and then run that file through |
I found the bug. If you supply the map parameter the compile function will return an object rather than a string, but when running code directly this check apparently was forgotten. Should probably have a similar check as is been done a few lines below it. |
Fixing that, makes the code run with the map parameter again, but for some reason |
send a PR with the fix then... did you I think what's happening is the install function probably will not work with |
wait, new function shouldn't make any difference. I need sleep. I'm not sure where the problem is. I also had a look at the install function and it looks like it's just massaging the text on good luck & good nite :) |
I just edited the source code via GitHub. I changed two files, and did not know how to merge them into one through GitHub interface, so I just made two pull requests: #832 (the fix) and #833 (more consistent check). However this only fixes the bug of crashing due to the incorrect call to As far as I know you cannot retrieve the code passed into eval when inspecting a stack trace of an error that happened within eval'ed code. That is why they check for |
I really want to be able to use source maps when using LiveScript in NodeJS, but it only seems to work for precompiled files. If I ask it to generate source maps when running LiveScript code on NodeJS, it will fail with the following error:
It seems like a bug, because it fails on
[object Object]
, which is seems like a bad call to toString.For now I work around it by precompiling the LiveScript code, but I am new to using a transpiler like LiveScript in NodeJS, what is the best practice here? Do you store the generated JS in a separate folder and add this folder to the paths that the require function checks? Or how do you prevent the generated JS files from polluting your source folders?
The text was updated successfully, but these errors were encountered: