postcss: root.markClean is not a function error after updating to v8.4.42

Hi!

After updating to version 8.4.42, I started encountering the error TypeError: root.markClean is not a function when trying to build the project. I reviewed the changes between versions v8.4.41 and v8.4.42, and it seems that the code causing the issue was added in lib/lazy-result.js at lines 272 and 377. I wanted to ask if this error is occuring only for me, and if there’s anything I can check to resolve it besides downgrading the version?

Here is a screenshot of the error that occurred during the build process: image

Additionally, if there’s any other information I should provide or if there’s anything that doesn’t align with the issue guidelines, please let me know. I’d appreciate any assistance!

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 21 (9 by maintainers)

Most upvoted comments

Try 8.4.44 release

I was also using Next.js v14.2.7, with postcss v8.4.42. Upgrading to v8.4.43 didn’t fix the issue.

postcss.config.js:

module.exports = {
    plugins: {
        'postcss-import': {},
        'tailwindcss/nesting': {},
        tailwindcss: {},
        autoprefixer: {},
    },
}

result of pnpm ls postcss:

$ pnpm ls postcss
Legend: production dependency, optional only, dev only

<redacted>@0.1.4 /project/path

devDependencies:
postcss 8.4.43

Error stacktrace:

$ pnpm dev       

> <redacted>@0.1.4 dev /project/path
> next dev

  ▲ Next.js 14.2.7
  - Local:        http://localhost:3000
  - Environments: .env

 ✓ Starting...
 ✓ Ready in 3.1s
 ○ Compiling /_not-found ...
 ⨯ ./src/styles/globals.css.webpack[javascript/auto]!=!./node_modules/.pnpm/next@14.2.7_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/.pnpm/next@14.2.7_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/styles/globals.css
TypeError: root.markClean is not a function
Import trace for requested module:
./src/styles/globals.css.webpack[javascript/auto]!=!./node_modules/.pnpm/next@14.2.7_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/.pnpm/next@14.2.7_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/styles/globals.css
./src/styles/globals.css
 ⨯ ./src/styles/globals.css.webpack[javascript/auto]!=!./node_modules/.pnpm/next@14.2.7_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/.pnpm/next@14.2.7_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/styles/globals.css
TypeError: root.markClean is not a function
Import trace for requested module:
./src/styles/globals.css.webpack[javascript/auto]!=!./node_modules/.pnpm/next@14.2.7_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/.pnpm/next@14.2.7_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/styles/globals.css
./src/styles/globals.css

I’m still getting the same error in 8.4.43. Removed and reinstalled packages and lock file and still got the error.