Skip to content

More readable error when trying to compose class that doesn't exist #2

@axelboc

Description

@axelboc

Feature request

Improve error message when trying to compose a class that doesn't exist in the target CSS module.

Motivations

Thank you so much for looking into these CSS Modules issues! I'm still testing but the first problem I encountered was the following error:

Internal server error: Cannot read properties of undefined (reading 'exportAs')

It occurred on a composes declaration in which the class I was trying to compose did not exist in the target CSS module. This kind of issue was not reported previously, so it's such a nice win that it is now!!

Since the error message is a bit cryptic, would it be possible to rethrow a clearer error message?

Alternatives

No response

Additional context

No response

Contributions

  • I plan to open a pull request for this issue
  • I plan to make a financial contribution to this project

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions