stylelint: Fresh install throw me "Cannot read property 'length' of undefined"
TypeError: Cannot read property 'length' of undefined
at exports.default (/Users/moox/Sync/Development/phenomic/docs/node_modules/stylelint/dist/utils/isStandardSyntaxDeclaration.js:28:38)
at /Users/moox/Sync/Development/phenomic/docs/node_modules/stylelint/dist/rules/custom-property-empty-line-before/index.js:30:51
at /Users/moox/Sync/Development/phenomic/docs/node_modules/postcss/lib/container.js:207:28
at /Users/moox/Sync/Development/phenomic/docs/node_modules/postcss/lib/container.js:163:26
at AtRule.each (/Users/moox/Sync/Development/phenomic/docs/node_modules/postcss/lib/container.js:129:22)
at AtRule.walk (/Users/moox/Sync/Development/phenomic/docs/node_modules/postcss/lib/container.js:162:21)
at /Users/moox/Sync/Development/phenomic/docs/node_modules/postcss/lib/container.js:165:32
at Rule.each (/Users/moox/Sync/Development/phenomic/docs/node_modules/postcss/lib/container.js:129:22)
at Rule.walk (/Users/moox/Sync/Development/phenomic/docs/node_modules/postcss/lib/container.js:162:21)
at /Users/moox/Sync/Development/phenomic/docs/node_modules/postcss/lib/container.js:165:32
To reproduce:
git clone https://github.com/MoOx/phenomic.git
npm i
npm test
Maybe it’s related to recent change for #1870 ?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 22
- Comments: 16 (5 by maintainers)
Commits related to this issue
- lock stylelint to 7.2.0 See stylelint/stylelint#1914 for more details. — committed to phihag/bup by phihag 8 years ago
- Fixed: regression of 7.3.0 which caused a "Cannot read property 'length' of undefined" error on certain selector. Closes #1914 — committed to stylelint/stylelint by MoOx 8 years ago
- fix(stylelint): lock stylelint to avoid the error https://github.com/stylelint/stylelint/issues/1914 — committed to tetsuharuohzeki/karen by tetsuharuohzeki 8 years ago
- Fix node stylelint version to working version https://github.com/stylelint/stylelint/issues/1914 — committed to ONSdigital/eq-survey-runner by ajmaddaford 8 years ago
- Capped stylelint to 7.2.0 (#1) https://github.com/stylelint/stylelint/issues/1914 — committed to cerner/terra-core by roryhardy 8 years ago
Receiving the same error outlined above. Locking to
stylelint@7.2.0in my package.json fixes the problem for nowReleased as 7.3.1. Thanks again.
Perhaps it’s this line: https://github.com/stylelint/stylelint/pull/1894/files#diff-a70d9fa5a4645b7792581f70b486141bR21
Simpler example file: