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.

BUG: Cannot read property '0' of undefined

See original GitHub issue

Environment

  • clean-css version - 4.2.0:
  • node.js version - 10.7.0:
  • operating system: Mac High Sierra

Configuration options

Angular CLI 6.1.2, Angular 6.1.1

Error

The error is hidden because the error reporting code fails. looks to be an invalid animation issue in my 3rd party SCSS but I am not sure what it is. I will look deeper into my CSS but line break-up.js:566 needs fixing.

asset optimization node_modules/clean-css/lib/optimizer/level-2/properties/populate-components.js:30 throw e; ^

TypeError: Cannot read property ‘0’ of undefined at transition (./node_modules/clean-css/lib/optimizer/level-2/break-up.js:566:93) at Object.breakUp (./node_modules/clean-css/lib/optimizer/level-2/break-up.js:466:28) at populateComponents (./node_modules/clean-css/lib/optimizer/level-2/properties/populate-components.js:17:42) at optimizeProperties (./node_modules/clean-css/lib/optimizer/level-2/properties/optimize.js:19:3) at recursivelyOptimizeProperties (/Users/crash/git/traveliko/traveliko-spa/node_modules/clean-css/lib/optimizer/level-2/optimize.js:63:9) at recursivelyOptimizeProperties (./node_modules/clean-css/lib/optimizer/level-2/optimize.js:66:9)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:29

github_iconTop GitHub Comments

3reactions
lilcodercommented, Aug 16, 2018

@bjornharvold I got it to work when I set “extractCss” to false

“extractCss”: false,

2reactions
umutdevelopercommented, Sep 13, 2018

Hi, please upgrade and fix this issue. At “node_modules@angular-devkit\build-angular\node_modules\clean-css\lib\optimizer\level-2\break-up.js:566:93”

throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');

[0] is undefined so throwing exception is also throwing exception, LOL. And I am getting this error at bootstrap.css process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Prevent the Error: Cannot Read Property '0' of Undefined
If a property of an object is an array, it's possible to accidentally misspell the key or try to access the array through...
Read more >
TypeError: Cannot read property '0' of undefined - Google app ...
I have a code that gets dates and saves them and an array so that it's used in another function to make a...
Read more >
TypeError: Cannot read property '0' of undefined #230 - GitHub
Describe the bug TypeError: Cannot read property '0' of undefined ; To Reproduce Steps to reproduce the behavior: ; Expected behavior. Command ...
Read more >
Help: TypeError: Cannot read property '0' of undefined
Hello I am receiving the following error when I run my study on Pavlovia ( TypeError: Cannot read property '0' of undefined).
Read more >
TypeError: Cannot read Property '0' of Undefined in JS
The "Cannot read Property '0' of undefined" error occurs when accessing an undefined value at index 0 . To solve the error, initialize...
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