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.

[v8.4.19] Cannot read properties of undefined (reading 'stringify')

See original GitHub issue

After updating from 8.4.18 to 8.4.19 I get the following error when using stylelint.

I am using linaria inside nextjs.

[stylelint] TypeError: Cannot read properties of undefined (reading 'stringify')
[stylelint]     at Function.stringify ([...]application/node_modules/postcss-syntax/stringify.js:8:38)
[stylelint]     at MapGenerator.generate ([...]application/node_modules/stylelint/node_modules/postcss/lib/map-generator.js:328:12)
[stylelint]     at LazyResult.stringify ([...]application/node_modules/stylelint/node_modules/postcss/lib/lazy-result.js:277:20)
[stylelint]     at LazyResult.runAsync ([...]application/node_modules/stylelint/node_modules/postcss/lib/lazy-result.js:443:17)
[stylelint]     at LazyResult.async ([...]application/node_modules/stylelint/node_modules/postcss/lib/lazy-result.js:221:30)
[stylelint]     at LazyResult.then ([...]application/node_modules/stylelint/node_modules/postcss/lib/lazy-result.js:206:17)
error Command failed with exit code 1.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
romainmenkecommented, Nov 11, 2022

Good catch!

Always happy to help out 🙇

1reaction
fmachereycommented, Nov 11, 2022

I think I found the problem. In my yarn.lock, the *.18 and *.19 versions were sperate entries, resolving to each version. I now regenerated my yarn.lock file, and now both versions resolve to the new *.19 version.

This also fixed the crashes for stylelint. I will close this issue.

Thanks for you quick response time and help on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack: TypeError: Cannot read property ... - Stack Overflow
Webpack: TypeError: Cannot read property 'properties' of undefined · it works fine for me, can you clarify which script gives the error? What ......
Read more >
TypeError: Cannot read property 'stringify' of undefined · Issue ...
Bug Report What is the current behavior? server.ts (global as any).WebSocket = require('ws'); (global as any).
Read more >
cannot read properties of undefined (reading 'getchildren ...
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
Read more >
JSON.stringify() - JavaScript - MDN Web Docs
The JSON.stringify() method converts a JavaScript value to a JSON string, ... A JSON string representing the given value, or undefined.
Read more >
JSON Object Examples: Stringify and Parse Methods Explained
JSON Stringify The JSON.stringify() method converts a JSON-safe ... values passed as properties on a object JSON.stringify({ x: 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