Cannot read property \\\'length\\\' of undefined


Topic: Cannot read property \\\'length\\\' of undefined

Ungr pro asked 6 years ago

Hello guys. Ive just downloaded https://git.mdbootstrap.com/mdb/jquery/jq-pro and I have problem whenever i try to use PRO scss. Btw: I use it only alone - without FREE scss - is that correct? ftb.scss
$fa-font-path: '~font-awesome/fonts';
@import '~font-awesome/scss/font-awesome.scss';

@import '~bootstrap/scss/bootstrap';
@import '~mdbootstrap-pro/scss/mdb';
After running Symfony's Webpack Encore
.\node_modules\.bin\encore.cmd production
error in ./src/AppBundle/Resources/public/scss/ftb.scss

Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'length' of undefined
at module.exports (S:\Programy\XAMPP\htdocs\node_modules\postcss-value-parser\lib\unit.js:7:24)
at S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:65:65
at Array.forEach (<anonymous>)
at S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:60:22
at S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:84:14
at walk (S:\Programy\XAMPP\htdocs\node_modules\postcss-value-parser\lib\walk.js:7:22)
at ValueParser.walk (S:\Programy\XAMPP\htdocs\node_modules\postcss-value-parser\lib\index.js:18:5)
at optimise (S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:43:64)
at S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:192:28
at S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:148:26
at Rule.each (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:114:22)
at Rule.walk (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:147:21)
at S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:150:32
at Root.each (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:114:22)
at Root.walk (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:147:21)
at Root.walkDecls (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:190:25)
at S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:123:20
at LazyResult.run (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:274:20)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:189:32)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at processing.Promise.then._this2.processed (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:228:20)
at new Promise (<anonymous>)
at LazyResult.async (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:225:27)
at LazyResult.then (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:131:21)
at runLoaders (S:\Programy\XAMPP\htdocs\node_modules\webpack\lib\NormalModule.js:195:19)
at S:\Programy\XAMPP\htdocs\node_modules\loader-runner\lib\LoaderRunner.js:364:11
at S:\Programy\XAMPP\htdocs\node_modules\loader-runner\lib\LoaderRunner.js:230:18
at context.callback (S:\Programy\XAMPP\htdocs\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at Object.<anonymous> (S:\Programy\XAMPP\htdocs\node_modules\css-loader\lib\loader.js:31:18)
at S:\Programy\XAMPP\htdocs\node_modules\css-loader\lib\processCss.js:224:4
at <anonymous>
at runMicrotasksCallback (internal/process/next_tick.js:121:5)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
error in ./src/AppBundle/Resources/public/scss/ftb.scss

Module build failed: TypeError: Cannot read property 'length' of undefined
at module.exports (S:\Programy\XAMPP\htdocs\node_modules\postcss-value-parser\lib\unit.js:7:24)
at S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:65:65
at Array.forEach (<anonymous>)
at S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:60:22
at S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:84:14
at walk (S:\Programy\XAMPP\htdocs\node_modules\postcss-value-parser\lib\walk.js:7:22)
at ValueParser.walk (S:\Programy\XAMPP\htdocs\node_modules\postcss-value-parser\lib\index.js:18:5)
at optimise (S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:43:64)
at S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:192:28
at S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:148:26
at Rule.each (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:114:22)
at Rule.walk (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:147:21)
at S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:150:32
at Root.each (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:114:22)
at Root.walk (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:147:21)
at Root.walkDecls (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\container.js:190:25)
at S:\Programy\XAMPP\htdocs\node_modules\postcss-minify-gradients\dist\index.js:123:20
at LazyResult.run (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:274:20)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:189:32)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:201:22)
at processing.Promise.then._this2.processed (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:228:20)
at new Promise (<anonymous>)
at LazyResult.async (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:225:27)
at LazyResult.then (S:\Programy\XAMPP\htdocs\node_modules\postcss\lib\lazy-result.js:131:21)

@ ./src/AppBundle/Resources/public/scss/ftb.scss 4:14-225

sburina pro commented 6 years ago

I have exactly the same problem. Following th thread, hoping for a swift solution..

sburina pro answered 6 years ago

The culprit: /scss/pro/_accordion-extended.scss Line 3:
background: linear-gradient(to 45deg, rgba(234, 21, 129, 0.6), rgba(10, 23, 187, 0.6) 100%);
My IDE says "Mismatched parameters". When I remove "to" from the first parameter, everytghing compiles just fine. So, the line that works for me is as follows:
background: linear-gradient(45deg, rgba(234, 21, 129, 0.6), rgba(10, 23, 187, 0.6) 100%);
 

Ungr pro commented 6 years ago

This works just flawlesly. Btw could you tell me how you were able to track the bug from the log? Or you encountered this one yourself earlier? I was literally trying to debug it the whole evening without a clue..

sburina pro commented 6 years ago

I wasn't. :) I simply remarked the @import lines in mdb.scss and tried building until I found it. Once the file was identified and linted, everything became clear. :)

Ungr pro answered 6 years ago

Looking forward to get this bugfix onto next version

Marta Szymanska staff pro premium answered 6 years ago

Hi, today we updated this repository. Try the updated version and maybe it will solve your problems. If not, write to us. Best, Marta

sburina pro commented 6 years ago

Thank you, Marta! :)

Ungr pro commented 6 years ago

Confirming this solved the issue.

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.9
  • Device: PC
  • Browser: Chrome 69
  • OS: Win 10
  • Provided sample code: Yes
  • Provided link: No
Tags