Using a class name of .selectors when running with postcss-modules then autoprefixer causes the following error:
UnhandledPromiseRejectionWarning: TypeError: checker.check is not a function
This happens at this line.
Minimal reproduction:
const autoprefixer = require("autoprefixer");
const cssModules = require("postcss-modules");
const postcss = require("postcss");
const css = `
.selectors {
color: red;
}
`;
postcss([
cssModules,
autoprefixer
])
.process(css)
.then(result => console.log(result.css));
Sticking a log above the erroring line to show checker yields the following:
OldValue {
unprefixed: 'calc',
prefixed: '-webkit-calc',
string: '-webkit-calc',
regexp: /(^|[\s,(])(\-webkit\-calc($|[\s(,]))/gi }
OldValue {
unprefixed: 'calc',
prefixed: '-moz-calc',
string: '-moz-calc',
regexp: /(^|[\s,(])(\-moz\-calc($|[\s(,]))/gi }
OldValue {
unprefixed: 'calc',
prefixed: '-webkit-calc',
string: '-webkit-calc',
regexp: /(^|[\s,(])(\-webkit\-calc($|[\s(,]))/gi }
OldValue {
unprefixed: 'calc',
prefixed: '-moz-calc',
string: '-moz-calc',
regexp: /(^|[\s,(])(\-moz\-calc($|[\s(,]))/gi }
[Function: values] // Looks like the checker is being overriden by a function
Fixed 33ee989
Released in 9.7.3
Awesome thanks for getting this fixed so fast
Most helpful comment
Fixed 33ee989