material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

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

Open RyanEwen opened this issue 1 month ago • 2 comments

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

RyanEwen avatar May 03 '24 14:05 RyanEwen

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?

mnajdova avatar May 08 '24 13:05 mnajdova

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

RyanEwen avatar May 08 '24 16:05 RyanEwen