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.

@mui/codemod outputs mess

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

I am trying to upgrade from v4 to the new v5. I installed the necessary packages, try to run the codemod - and it outputs some kind of incomprehensible noise.

Expected behavior 🤔

Everything is working fine, I suppose?

Steps to reproduce 🕹

No response

Context 🔦

This happens regardless of whether I try to run the codemod on a folder or file (moreover, this happens with ANY file, it does not have to be a tsx/jsx component). Noise output goes on endlessly.

Demo video: https://1drv.ms/v/s!AsNfKXA75jDizyjDGogoPeALaihJ?e=7o6dsn

Your environment 🌎

I tried these actions on two Windows 11 and Windows 10 machines, as well as a virtual machine running Ubuntu 20.

Node setups are the same - node v16.13.1 and npm v8.3.0.

The runtime doesn’t matter either, I’ve tried PowerShell, Bash and Windows Cmd.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

5reactions
e965commented, Jan 10, 2022

@pussyslain yes, that really is the problem.

Temporary solution:

  1. Install the @mui/codemod package locally in the project
  2. put this in package.json file:
  "resolutions": {
    "colors": "1.4.0"
  },
  "overrides": {
    "colors@1": "1.4.0"
  }
  1. create script
  "mui-codemod": "codemod v5.0.0/preset-safe"
  1. run:
yarn mui-codemod <path> 
# or
npm run mui-codemod <path>

And everything works as it should.

1reaction
Vahid-Tahericommented, Jan 10, 2022

@e965 very on-time solution. 👍 I was looking for it right now! In my case, it works by running yarn install before the 4th step after adding resolutions. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Critical: Need to restrict colors.js dependency · Issue #474
@mui/codemod outputs mess mui/material-ui#30565 ... fix(deps): update jscodeshift facebook/react-native#32905.
Read more >
mui/codemod
Start using @mui/codemod in your project by running `npm i @mui/codemod`. There are 5 other projects in the npm registry using @mui/codemod.
Read more >
Makestyles react. Basics of the sx prop in v5. Mui ...
There is now a codemod in MUI for migrating from JSS to TSS. ... Using makeStyles, you can add CSS in JS without...
Read more >
MUI's codemod for converting jss components to styled not ...
I am migrating from MUI v4 to v5. So I have countless components that needs to be changed from the makeStyles API to...
Read more >
wfS - River Thames Conditions - Environment Agency - GOV.UK
Area 0117, Zeiss 6-24x72 manual, Austrian top 10 music charts, The first noel ... Anita mui concert 2002, Dj phantom 2 battery, The...
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