MoOx / postcss-cssnext

`postcss-cssnext` has been deprecated in favor of `postcss-preset-env`.
https://moox.io/blog/deprecating-cssnext/
MIT License
5.3k stars 189 forks source link

no such file or directory @std/esm/esm.js.gz #442

Closed theboyWhoCriedWoolf closed 6 years ago

theboyWhoCriedWoolf commented 6 years ago

Hello,

I am using webpack 3 and postcss-next 3.0.2 and when using within my postcss plugin list I get the following error:

`Error cannot find module $mylocaldir/node_modules/@std/esm/esm.js.gz'.

my setup is:

                test: /\.css$/,
                use: [
                    require.resolve('style-loader'),
                    {
                        loader: require.resolve('css-loader'),
                        options: {
                            importLoaders: 1,
                        },
                    },
                    {
                        loader: require.resolve('postcss-loader'),
                        options: {
                            ident: 'postcss',
                            plugins: () => [
                                require('postcss-flexbugs-fixes'),
                                require('postcss-cssnext')(),
                                require('postcss-cssnext')({
                                    browsers: [
                                        '>1%',
                                        'last 4 versions',
                                        'Firefox ESR',
                                        'not ie < 9', // React doesn't support IE8 anyway
                                    ],
                                }),
                            ],
                        },
                    },
                ],

Thanks in advance.

MoOx commented 6 years ago

Please clean you npm cache & reinstall. Looks like a node modules issue.

Note: you required cssnext twice, which seems useless.

theboyWhoCriedWoolf commented 6 years ago

Yeah sorry that was an oversight. Still getting the same issue after cleaning the cache for both npm and yarn.

I think it might be an issue with the postcss-loader.

Thanks anyway.