ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
g-rusev opened this issue · 1 comments
Bug report
Actual Behavior
Minimal test repository:
https://github.com/g-rusev/postcss-error
Environment:
OS: Windows 10 Pro, 64 bit, 21H2
NodeJS: version 20.4.0
When using the POSTCSS-LOADER version 7.3.3 build fails with the error:
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
When the version in the package.json is set to:
"postcss-loader": "7.0.2"
build succeeds.
To summarize:
The same code base in the test repo:
when build with "postcss-loader": "7.0.2" - succeeds
when build with "postcss-loader": "7.3.3" - fails
Expected Behavior
It should build with the latest version of POST CSS LOADER with no errors.
How Do We Reproduce?
- Download the test repo.
- Run
npm i
to install dependencies. - Run
npm run dev
to start the build. The build will fail with errors.
Please paste the results of npx webpack info
here, and mention other relevant information
Sounds like cosmiconfig
is using private methods... Please check your Node.js version twice, because 20.4.0
supports them, I can't reproduce the problem locally using your repo, try to run node --version
, maybe you have two version Node.js (for example some developers use nvm
to switch between different Node.js version), anyway we can't fix it here, sorry, but feel free to feedback