-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Package exports for '...\autoprefixer\node_modules\kleur' do not define a valid './colors' target in version 9.8.1 #1328
Comments
It looks like I am able to work around this issue in a project created today with create-react-app by downgrading autoprefixer:
|
@lukeed can you look at this issue? Seems like it is ESM module package problem. |
Yes looking into it now. |
Can someone provide their Node version, and perhaps a minimum reproduction? I ran this const autoprefixer = require('autoprefixer')
const postcss = require('postcss')
const css = `
.foo {
displax: flex;
transform: scale(0.5);
}
`;
postcss([ autoprefixer ]).process(css).then(result => {
result.warnings().forEach(warn => {
console.warn(warn.toString())
})
console.log(result.css)
}) I ran the same thing as an -- const autoprefixer = require('autoprefixer')
-- const postcss = require('postcss')
++ import autoprefixer from 'autoprefixer'
++ import postcss from 'postcss' Not saying anyone is wrong, just looking to reproduce |
I've also installed a fresh CRA app with Node 10, 12, and 14. Running the |
@jens-duttke @larsthorup what Node.js version do you use? Is it old Node.js 13? |
I just tested my |
Oh yeah, I would definitely advise deleting any Node 13.x from your system. That entire version was a playground for different ESM/ |
I will post a tweet about Node.js 13 and Autoprefixer |
@gragland No, I wouldn't say that. CRA installs $ pnpx create-react-app my-app
$ cd my-app && yarn why autoprefixer
In order to even get 9.8.1 loaded into the toolchain, I've been needing to Moving onto Node questions (for when someone gets an updated copy of any dependency that has a future-proof conditional
Make of that what you will, but to me that's what a new experimental feature looks like. |
We support the latest version. The problem is with old versions. |
I think it will be nice to add |
@ai In this case, it might make it more confusing? There's only a constraint within the 13.x range since some versions looked at The only versions of Node 12.x that even look at Any older versions of Node 12.x and below (<=11) never look at Node 14.x launched with the official behavior, so it won't have any issues. |
Yeap, I will block only the old Node.js 13 versions |
Fixed 6842832 |
|
Solution
|
Since the update to 9.8.1 I get hundreds of errors while compiling my Webpack project:
Maybe I should note, that I'm using CSS variables for colors:
The text was updated successfully, but these errors were encountered: