mui / material-ui

Material UI: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
https://mui.com/material-ui/
MIT License
91.86k stars 31.57k forks source link

[material-ui][docs] codemods require certain version of nodejs otherwise fails with "Unexpected token ." #42110

Open RyanEwen opened 2 weeks ago

RyanEwen commented 2 weeks ago

Related page

https://mui.com/material-ui/migration/migration-v4/#run-codemods

Kind of issue

Missing information

Issue description

I've spent the last hour trying to run codemods but getting Unexpected token ..

Eventually through trial and error I tried running older codemods and one of them told me that I need at least nodejs v12 (I was on v10). Sure enough after updating (I went to v20) the latest codemods get past the error.

Context

Migrating from mui 4 to 5

Search keywords: codemod unexpected token

mnajdova commented 1 week ago

Thanks for the report. We have a section on supported browser and node version: https://mui.com/material-ui/migration/migration-v4/#supported-browsers-and-node-versions. Do you think we should move this to another section to make it clearer?

RyanEwen commented 1 week ago

Somehow I missed that section when doing my migration. That's on me, I guess. It could be command line tools checked for this themselves when executed, though