stylelint-no-unsupported-browser-features
stylelint-no-unsupported-browser-features copied to clipboard
Error using 8.0.0 with Stylelint 16.1.0
When i try to use this combination of versions, I get the following error when trying to lint my CSS:
Error [ERR_REQUIRE_ESM]: require() of ES Module .../node_modules/stylelint-no-unsupported-browser-features/lib/index.js from .../node_modules/stylelint/lib/augmentConfig.js not supported.
Instead change the require of index.js in .../node_modules/stylelint/lib/augmentConfig.js to a dynamic import() which is available in all CommonJS modules.
The error appears to happen in Line 334 of augmentConfig.js, when it tries to require the plugin, which seems to be an ESM. I cleared my node_modules folder and rebuilt it with yarn, but it did not solve the issue. Does it work for anyone with those versions?
so far I haven't been able to reproduce this with stylelint 16, but that's the expected behavior if you use version 8 with stylelint 15.
could you provide a minimal reproduction of the issue to debug?
Version 7.0.0 works well with stylelint 15, but 7.1.0 doesn't work. Same "ERR_REQUIRE_ESM" error.
@xsq007 from NPM: version 7.1 is the same as 8.0, and was incorrectly published under the wrong version
so yeah, don't use that version. my apologies for that! use 7.0.0 or 8+
try to use .mjs
and esm
syntax for your config
it works for me
try to use
.mjs
andesm
syntax for your config it works for me
Didn't help me unfortunately - switched to mjs and ESM but it's still the same error.