question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'insertAfter' of undefined

See original GitHub issue

Hi, I keep getting this error. I did “yarn cache clean” Reinstalled everything and still cannot figure out why this is failing.

Done in 38.91s.
Compiling...
Compilation failed:
warning package.json: No license field
TypeError: Cannot read property 'insertAfter' of undefined
    at node_modules/optimize-css-assets-webpack-plugin/node_modules/css-declaration-sorter/src/main.cjs:372:22
    at Array.forEach (<anonymous>)
    at processCss (node_modules/optimize-css-assets-webpack-plugin/node_modules/css-declaration-sorter/src/main.cjs:369:12)
    at node_modules/optimize-css-assets-webpack-plugin/node_modules/css-declaration-sorter/src/main.cjs:304:21
    at async LazyResult.runAsync (node_modules/optimize-css-assets-webpack-plugin/node_modules/postcss/lib/lazy-result.js:431:15)
    at async Promise.all (index 0)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:32 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
Siilwyncommented, Sep 6, 2021

I am surprised this bug has been present for so long!

Released a fix in 6.1.2.

2reactions
yunwuxincommented, Sep 2, 2021

I’m having the same issues

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'insertAfter' of undefined
The problem is related to tailwind error - ./node_modules/next/dist/compiled/css-loader/cjs.js??ruleSet[1].rules[2].oneOf[6].use[1]!.
Read more >
Uncaught TypeError: Cannot read property 'insertAfter' of null
Hi guys, can somebody please help me? For some reason DOTS to slide the content to left and right are not showing up....
Read more >
postcss/postcss - Gitter
TypeError : Cannot read property 'insertAfter' of undefined at Rule.cloneAfter (/Users/bbriggs/projects/cssnano/node_modules/postcss/lib/node.js:119:20).
Read more >
Tailwind CSS error: cannot read property of undefined ...
i have noe idea if thats it, but our project has a «app.pcss» file at the root with Tailwind's layer directives and global...
Read more >
[SOLVED] Cannot Read Property of Undefined in JavaScript
The “cannot read property of undefined” error occurs when you attempt to access a property or method of a variable that is undefined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found