Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 1.44 KB

README.md

File metadata and controls

19 lines (12 loc) · 1.44 KB

postcss-reporter emits undefined [undefined] warnings

Screenshot

Summary

When postcss-import and postcss-calc with warnWhenCannotResolve enabled are used, postcss-reporter starts to emit warnings saying undefined [undefined] in addition to valid ones ⚠ Could not reduce expression: ....

Steps to reproduce

  1. git clone
  2. yarn install
  3. node index.js

Cause

There are separate two issues in postcss-calc and postcss-reporter.

The first undefined is due to postcss-reporter's issue where it doesn't filter out messages that don't have text property. According to the postcss API document, required properties of Message are only type and plugin. postcss-import indeed pushes messages without text property. postcss-reporter, however, assumes each message has text, causing undefined to be shown as a message body.

The second undefined is due to postcss-import's issue where it doesn't set plugin property to their messages. As in the API documentation, the property is mandatory but they don't have it.