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

CSS Linter failing after upgrade to postcss version 8.4 and above. #1685

Open
saket2403 opened this issue Nov 30, 2021 · 8 comments
Open

CSS Linter failing after upgrade to postcss version 8.4 and above. #1685

saket2403 opened this issue Nov 30, 2021 · 8 comments

Comments

@saket2403
Copy link

saket2403 commented Nov 30, 2021

After the recent releases of postcss versions 8.4 and above our css linters have started to fail due to the following error message:
TypeError: opts.node.rangeBy is not a function. Attaching screenshot of the full error log

Screenshot 2021-11-30 at 11 16 05 AM

We have downgraded postcss to 8.3.11. Any guidance towards fixing the issue is appreciated. Thanks in advance.
@ai

@ai
Copy link
Member

ai commented Nov 30, 2021

We still have this method https://github.com/postcss/postcss/blob/main/lib/node.js#L260

You need to ask your linter developers.

@saket2403
Copy link
Author

We still have this method https://github.com/postcss/postcss/blob/main/lib/node.js#L260

You need to ask your linter developers.

Thanks for the inputs, looks like upgrading stylelint to latest version will fix the issue for us. So closing the issue.

@emilie-t-ledn
Copy link

If this can help anyone else.
I was at 8.3.6, and could see the rangeBy function was missing from the node.js file.
Upgrading to 8.4.4 fixed the issue.

@saket2403 saket2403 reopened this Dec 7, 2021
@saket2403
Copy link
Author

If this can help anyone else. I was at 8.3.6, and could see the rangeBy function was missing from the node.js file. Upgrading to 8.4.4 fixed the issue.

We are facing the issue on 8.4.4 itself @emilie-t-ledn .
I found a similar issue here in stylelint repo: Link. cc @ai

@benbcai
Copy link

benbcai commented Dec 15, 2021

@ai Are there any updates regarding this issue?

@ai
Copy link
Member

ai commented Dec 15, 2021

It is related to different PostCSS versions in node_modules. Run any tools to dedupe dependencies.

We had a protection against broken AST, but I have no idea why it is not calling here https://github.com/postcss/postcss/blob/main/lib/container.js#L320

@benbcai
Copy link

benbcai commented Jan 20, 2022

@ai Is there any update on this issue?

@ai
Copy link
Member

ai commented Jan 20, 2022

I didn’t find a why it happens and how to fix it.

If you help me, it will be very nice.

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

4 participants