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

Errors during plugin require() are masked #242

Closed
eemeli opened this issue Oct 11, 2018 · 1 comment
Closed

Errors during plugin require() are masked #242

eemeli opened this issue Oct 11, 2018 · 1 comment

Comments

@eemeli
Copy link
Contributor

eemeli commented Oct 11, 2018

When a plugin throws an error when it's required, postcss-cli always prints Plugin Error: Cannot find module '${plugin}' rather than reporting the actual error.

I spent a little while today debugging because of this, as I was getting the above error due to cssnano throwing a BrowserslistError due to a bad config. That root cause would have been significantly easier to figure out if the original error had not been masked.

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 11, 2018

Good point; PR welcome to include the actual error in the error message.

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

No branches or pull requests

2 participants