Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylelint 11.0.0+ : TypeError: Cannot read property 'start' of undefined #188

Closed
akoidan opened this issue Oct 13, 2019 · 7 comments
Closed

Comments

@akoidan
Copy link

akoidan commented Oct 13, 2019

  • Operating System: Archlinux (doesn't matter)
  • Node Version: Doesn't matter (tested with v10.16.3, 12.10.0)
  • NPM Version: 6.9.0 (doesn't matter)
  • webpack Version: 4.41.1
  • stylelint-webpack-plugin Version: 1.0.2

Expected Behavior

Code compiles w/o errors

Actual Behavior

TypeError: Cannot read property 'start' of undefined
    at LocalFixer.node (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/parse-style.js:35:27)
    at root.walk.node (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/parse-style.js:41:9)
    at /home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss/lib/container.js:135:18
    at Root.each (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss/lib/container.js:101:16)
    at Root.walk (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss/lib/container.js:131:17)
    at LocalFixer.root (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/parse-style.js:40:8)
    at LocalFixer.parse (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/parse-style.js:69:9)
    at parseStyle (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/parse-style.js:88:39)
    at styles.sort.forEach.style (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/parse-style.js:103:17)
    at Array.forEach (<anonymous>)
    at parseStyle (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/parse-style.js:102:6)
    at processor (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/processor.js:26:9)
    at Object.parse (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss-syntax/parse.js:25:10)
    at new LazyResult (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/postcss/lib/lazy-result.js:60:16)
    at getCode.then.code (/home/andrew/WebstormProjects/vue-webpack-typescript/node_modules/stylelint/lib/getPostcssResult.js:127:22)

Code

Not configuration related.

How Do We Reproduce?

  • Check the branch stylelint-webpack-plugin-error
  • Use stylelint-webpack-plugin with stylelint >= ^11.0.0. If you downgrade stylelint to 10.1.0 it works fine.
  • Related issue to configuration change is here
@vankop
Copy link

vankop commented Oct 13, 2019

@akoidan could you try to run just stylelint without this plugin? maybe this issue related to stylelint instead of webpack plugin

@akoidan
Copy link
Author

akoidan commented Oct 13, 2019

@vankop this issue IS related to stylelint, since that changed the API, and it doesn't work with the same code as it did before. The description is in related issue I attached. I guess it's either worth changing the README, specifying the version of stylelint, either support the latest version of stylelint that you have in the readme.

@ricardogobbosouza
Copy link
Collaborator

@akoidan I couldn't understand the problem and I couldn't reproduce either

@akoidan
Copy link
Author

akoidan commented Oct 19, 2019

@akoidan I couldn't understand the problem and I couldn't reproduce either

I attached the repo and mentioned it in the description in the How Do We Reproduce? section. Does it work on your PC? https://github.com/akoidan/vue-webpack-typescript/tree/stylelint-webpack-plugin-error , mind the branch

@ricardogobbosouza
Copy link
Collaborator

@akoidan There are several errors and warnings, but none related to this plugin.

@akoidan
Copy link
Author

akoidan commented Oct 20, 2019

@ricardogobbosouza yeah, I think it's rather related to scss syntax stylelint-scss/stylelint-scss#380

@ricardogobbosouza
Copy link
Collaborator

Forwaded to AleshaOleg/postcss-sass#120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants