carbon-design-system / carbon-tutorial-nextjs

https://carbon-tutorial-nextjs.vercel.app
Apache License 2.0
17 stars 439 forks source link

Error: Cannot find module 'postcss-import'" #135

Open rmasonhx12 opened 7 months ago

rmasonhx12 commented 7 months ago

cloned repo -- did steps to set upstream and forked repo in synch -- yarn, yarn build, yarn dev with following output

Failed to compile ./src/app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[4].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[4].oneOf[12].use[3]!./src/app/globals.css Error: Cannot find module 'postcss-import' Require stack:

rmasonhx12 commented 7 months ago

I was able to correct problem --

  1. yarn add postcss-import --dev
  2. yarn add postcss.config.js module.exports = { plugins: { 'postcss-import': {}, 'autoprefixer': {}, // other plugins specified as key-value pairs }, };
  3. yarn add autoprefixer --dev

restart server -- yarn dev -- Success Compiled

~~ Please update project as clone needs the postcss import and autoprefixer to run.

rmasonhx12 commented 7 months ago

~~ Please update project as clone needs the postcss import and autoprefixer to run. SEE ABOVE ISSUE WHICH I CLOSED BUT FORGOT TO WAIT FOR RESPONSE -- REOPENED FOR THIS REASON