material-ui
material-ui copied to clipboard
[material-ui][docs] codemods require certain version of nodejs otherwise fails with "Unexpected token ."
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
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?
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