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 'mode' of undefined

See original GitHub issue

Hi,

I guess I found a bug: If I try to lint a file with the following content:

$breadcrumbs-item-separator-item-rtl: '\\';
$button-background: background('');

I get the this error:

TypeError: Cannot read property 'mode' of undefined
    at findCommentsInRaws (node_modules/stylelint-scss/dist/utils/findCommentsInRaws.js:63:44)
    at checkRoot (node_modules/stylelint-scss/dist/rules/double-slash-comment-whitespace-inside/index.js:28:52)
    at exports.default (node_modules/stylelint-scss/dist/utils/eachRoot.js:14:5)
    at node_modules/stylelint-scss/dist/rules/double-slash-comment-whitespace-inside/index.js:19:25
    at Promise.resolve.then (node_modules/stylelint/lib/lintSource.js:230:9)

I narrowed it down a bit, so this only happens when the first value is the string with the two backslashes and when the second variable holds the result a function-call with a string as parameter. Any other combination seem to work properly.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kristerkaricommented, Dec 22, 2018
0reactions
axelboccommented, Apr 30, 2019

Hmm, seems to be working fine now, strange. Sorry about that! I’ll let you know if I bump into the issue again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'mode' of undefined · Issue #6 - GitHub
After adding this plugin to an ejected CRA project I get: Cannot read property 'mode' of undefined Are we assuming some particular webpack ......
Read more >
Cannot read property 'mode' of undefined - Stack Overflow
Got the answer! I was using the slim version of jquery...
Read more >
Uncaught TypeError: Cannot read property 'mode' of undefined
Error is jquery.validate.min.js?ver=1.15.1:4 Uncaught TypeError: Cannot read property 'mode' of undefined in user registration plugin
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
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