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

Readable error message #44

Open
goulu opened this issue Jul 7, 2022 · 1 comment
Open

Readable error message #44

goulu opened this issue Jul 7, 2022 · 1 comment
Labels
approved proposal enhancement New feature or request good first issue Good for newcomers

Comments

@goulu
Copy link

goulu commented Jul 7, 2022

while running my create-app with a new template I created I get this error

Parse error on line 50:
...d. For example, `{{a}` will match `['{',
-----------------------^
Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', 'SEP', got 'INVALID'

Error: Parse error on line 50:
...d. For example, `{{a}` will match `['{',
-----------------------^
Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', 'SEP', got 'INVALID'
    at Parser.parseError (C:\dev\create-create-app\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:267:19)
    at Parser.parse (C:\dev\create-create-app\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:336:30)
    at parseWithoutProcessing (C:\dev\create-create-app\node_modules\handlebars\dist\cjs\handlebars\compiler\base.js:46:33)
    at HandlebarsEnvironment.parse (C:\dev\create-create-app\node_modules\handlebars\dist\cjs\handlebars\compiler\base.js:52:13)
    at compileInput (C:\dev\create-create-app\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:508:19)
    at ret (C:\dev\create-create-app\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:517:18)
    at Q (C:\dev\create-create-app\lib\index.js:1:3869)
    at ie (C:\dev\create-create-app\lib\index.js:1:4383)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Be (C:\dev\create-create-app\lib\index.js:2:52)
I guess I have a problem in one of the template files, but which one ?
I wanted to catch this error and issue a clearer message bout couldn't manage to launch create(-create)-app with a debugger...
Is there a launch.json configuration for VSCode that would work ?
@goulu
Copy link
Author

goulu commented Jul 7, 2022

Found ! I had mistakenly run npm install in the template dir, so there were node_modules there ...

Anyway, a clearer message would have helped ...

@uetchy uetchy changed the title cryptic errors (+ how to debug?) Readable error message Jul 26, 2022
@uetchy uetchy added enhancement New feature or request good first issue Good for newcomers approved proposal labels Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved proposal enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants