question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error using @material-ui/codemod@next

See original GitHub issue
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When running the script as described: npx @material-ui/codemod@next v5.0.0/preset-safe src

an error is thrown:

➜  firecms git:(master) ✗ npx @material-ui/codemod@next v5.0.0/preset-safe src 
npx @material-ui/codemod <codemod> <paths...>

Applies a `@material-ui/codemod` to the specified paths

Positionals:
  codemod                                                               [string]
  paths                                                                 [string]

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]
  --dry                                               [boolean] [default: false]
  --print                                             [boolean] [default: false]

Examples:
  npx @material-ui/codemod v4.0.0/theme-spacing-api src
  npx @material-ui/codemod v5.0.0/component-rename-prop src --
  --component=Grid --from=prop --to=newProp

Error: Transform 'v5.0.0/preset-safe' not found. Check out /Users/francesco/.npm/_npx/1b4831ee47e072b8/node_modules/@material-ui/codemod/README.md for a list of available codemods.
    at runTransform (/Users/francesco/.npm/_npx/1b4831ee47e072b8/node_modules/@material-ui/codemod/codemod.js:23:15)

Expected Behavior 🤔

Migration is performed

Steps to Reproduce 🕹

Steps:

  1. Just run the script

Context 🔦

Your Environment 🌎


  System:
    OS: macOS 11.4
  Binaries:
    Node: 12.22.1 - ~/.nvm/versions/node/v12.22.1/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.19.1 - ~/.nvm/versions/node/v12.22.1/bin/npm
  Browsers:
    Chrome: 91.0.4472.114
    Edge: Not Found
    Firefox: 80.0.1
    Safari: 14.1.1
  npmPackages:
    @material-ui/core: ^5.0.0-beta.1 => 5.0.0-beta.1 
    @material-ui/icons: ^5.0.0-beta.1 => 5.0.0-beta.1 
    @material-ui/lab: ^5.0.0-alpha.40 => 5.0.0-alpha.40 
    @material-ui/private-theming:  5.0.0-beta.1 
    @material-ui/styled-engine:  5.0.0-beta.1 
    @material-ui/system:  5.0.0-beta.1 
    @material-ui/types:  6.0.1 
    @material-ui/unstyled:  5.0.0-alpha.40 
    @material-ui/utils:  5.0.0-beta.0 
    @types/react: ^17.0.5 => 17.0.9 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 
    typescript: ^4.3.3 => 4.3.3 

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
siriwatknpcommented, Jul 16, 2021

I try @material-ui/codemod@next and I got v5.0.0-beta.0. I think there is some mistake on the latest release, I will make sure that it is released next week.

3reactions
eps1loncommented, Jul 21, 2021

Released @material-ui/codemod@5.0.0-beta.1 from https://github.com/mui-org/material-ui/tree/v5.0.0-beta.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error using @material-ui/codemod@next #27302 - GitHub
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >
@material-ui/codemod - npm
Start using @material-ui/codemod in your project by running `npm ... There are 11 other projects in the npm registry using @material-ui/codemod.
Read more >
Troubleshooting - Material UI - MUI
To fix this error, you must replace the import. For more details, see this GitHub issue. We recommend using this codemod to fix...
Read more >
Is it's possible use material-ui codemod v5 in project with flow ...
When i run codemode with: npx @mui/codemod v5.0.0/preset-safe . it's not working, in files where flowjs types declared as: ...
Read more >
Migrate Material-UI 4 to Mui-5 - DEV Community ‍ ‍
we'll be migration the legacy Material-ui 4 to Material-ui 5 ... another solution to migrate the makeStyles to styled using codemod:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found