-
Notifications
You must be signed in to change notification settings - Fork 45
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
SyntaxError: Unexpected character '@' #2020
Comments
Hi @vjpr , Could you please share your wallaby configuration file, tsconfig.json, babel.config.js and package.json? Thanks. |
It's too complex. Should At what stage of does the What is being parsed? Is it the Is there a way to debug this? Maybe with a pre or post processor? |
It depends on your Wallaby config. Could you please provide it as well as
Compile time. If it was runtime, there'll be some messages in the log saying about started test run.
It depends on your Wallaby config/project structure. |
Issue seems to be that microsoft/ReSub#98
I wish there was more error information. Tracking down Wallaby errors always takes forever. Can't you provide the babel compile stack? |
In your case it doesn't look like Wallaby related error. If I understand the issue correctly, you'd be able to reproduce the same one when running your testing framework from CLI (without Wallaby).
I checked and unfortunately there is no Babel stack, because there's no error raised from Babel. Babel simply ignores the decorator, and not throwing any errors in this case. |
@ArtemGovorov I'm trying to catch the error so I can give the user a hint of how to fix it. The file is not being written to the
Is there a way to catch this error ( And how to debug it - because the user doesn't know what parser Wallaby is using... So seems you are using You should say something like:
Could we also show the "inner error" stack trace from the Acorn parser? This would allow easy debugging of the exact source of the error. EDIT: Looks like the I've come across similar errors many times, and have always been left scratching my head and blindly trying things. Also, on the postprocessors page, it lists the processing pipeline as so:
Is it true that instrumentation comes before preprocessors? |
Have filed issue with Acorn to provide better error message for this particular case: acornjs/acorn#816 |
Thanks for your feedback. We have improved the error reporting for instrumentation failures in the latest core version. |
Sorry, the change had not made it through in yesterday's build, but the latest 1.0.665 version contains it. |
I appreciate the improvement, its definitely a step in the right direction. But its still next to impossible for a user to resolve these errors by themself. I think it would be worthwhile adding some of my suggested comments here to an FAQ page. Not knowing that |
Thanks for the feedback. We have added some of your comments to the FAQ section. |
Issue description or question
ZoneService.ts uses a decorator.
What is causing this issue? I am using Babel to compile my TS with an override in
babel.config.js
.I also have a
tsconfig.json
file, but it doesn't seem to be reading it.The text was updated successfully, but these errors were encountered: