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

syntax error in .bowerrc: print error message instead of useless stacktrace #220

Closed
voda opened this issue Jan 28, 2013 · 2 comments
Closed

Comments

@voda
Copy link

voda commented Jan 28, 2013

When i have a syntax error in .bowerrc, eg:

{
    "directory": "vendor/components"
}

i get this output:

undefined:3
}
^
SyntaxError: Unexpected token }
    at Object.parse (native)
    ...

instead of a meaningful error message similar to the message, when there is a syntax error in component.json (bower error There was an error while reading the component.json).

@satazor
Copy link
Member

satazor commented Jan 29, 2013

It's not possible to print a beautiful error in this case because the config is parsed when modules are being required. What we could do is improve the error message in the trace itself.

@voda
Copy link
Author

voda commented Jan 29, 2013

Thanks, that looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants