gatsby purge css plugin not installing

41 views Asked by At

To merge the css in my gatsby project I was trying to install a plugin called purge css but while installing it gives the error and stops `evo02@evo02:/var/www/html/Evolvan (staging fresh without edits)/evolvan.com-gatsby$ npm install gatsby-plugin-purgecss npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: [email protected] npm WARN Found: [email protected] npm WARN node_modules/react npm WARN peerOptional react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @apollo/[email protected] npm WARN node_modules/@apollo/client npm WARN peer @apollo/client@"^3" from @graphql-tools/[email protected] npm WARN node_modules/@graphql-tools/links npm WARN 2 more (apollo-upload-client, gatsby-source-graphql) npm WARN 20 more (@gatsbyjs/reach-router, formik, gatsby, gatsby-link, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"0.0.0-experimental-c8b778b7f-20220825" from [email protected] npm WARN node_modules/react-server-dom-webpack npm WARN react-server-dom-webpack@"0.0.0-experimental-c8b778b7f-20220825" from [email protected] npm WARN node_modules/gatsby npm WARN npm WARN Conflicting peer dependency: [email protected] npm WARN node_modules/react npm WARN peer react@"0.0.0-experimental-c8b778b7f-20220825" from [email protected] npm WARN node_modules/react-server-dom-webpack npm WARN react-server-dom-webpack@"0.0.0-experimental-c8b778b7f-20220825" from [email protected] npm WARN node_modules/gatsby npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/webpack npm ERR! peer webpack@">=4.43.0 <6.0.0" from @pmmmwh/[email protected] npm ERR! node_modules/@pmmmwh/react-refresh-webpack-plugin npm ERR! @pmmmwh/react-refresh-webpack-plugin@"^0.5.10" from [email protected] npm ERR! node_modules/gatsby npm ERR! peer gatsby@"^5.0.0-next" from [email protected] npm ERR! node_modules/babel-plugin-remove-graphql-queries npm ERR! babel-plugin-remove-graphql-queries@"^5.10.0" from [email protected] npm ERR! 2 more (gatsby-plugin-image, gatsby-plugin-typescript) npm ERR! 15 more (gatsby-plugin-eslint, gatsby-plugin-google-gtag, ...) npm ERR! peer webpack@">=2" from [email protected] npm ERR! node_modules/babel-loader npm ERR! babel-loader@"^8.3.0" from [email protected] npm ERR! node_modules/gatsby npm ERR! peer gatsby@"^5.0.0-next" from [email protected] npm ERR! node_modules/babel-plugin-remove-graphql-queries npm ERR! babel-plugin-remove-graphql-queries@"^5.10.0" from [email protected] npm ERR! 2 more (gatsby-plugin-image, gatsby-plugin-typescript) npm ERR! 15 more (gatsby-plugin-eslint, gatsby-plugin-google-gtag, ...) npm ERR! 18 more (css-loader, css-minimizer-webpack-plugin, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from [email protected] npm ERR! node_modules/webpack-filter-warnings-plugin npm ERR! webpack-filter-warnings-plugin@"^1.2.1" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/webpack npm ERR! peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from [email protected] npm ERR! node_modules/webpack-filter-warnings-plugin npm ERR! webpack-filter-warnings-plugin@"^1.2.1" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! /home/evo02/.npm/_logs/2023-07-11T04_50_23_178Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/evo02/.npm/_logs/2023-07-11T04_50_23_178Z-debug-0.log`

treid clearing cache npm cache clean --force but it also gives npm WARN using --force Recommended protections disabled. now not sure whether it has cleared cache or not

1

There are 1 answers

0
Athir Nuaimi On

Take a look at this issue (and possible resolutions) in the Gatsby GitHub project. It has to do with Gatsby using an experimental version of react-server-dom-webpack