material-ui-codemod does not work
See original GitHub issueProblem Description
Used this instruction as reference: https://github.com/callemall/material-ui/tree/master/packages/material-ui-codemod
- material-ui-codemod can not be installed from npm:
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node/5.6.0/bin/node" "/usr/local/bin/npm" "install" "material-ui-codemod"
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/material-ui-codemod
npm ERR! 404
npm ERR! 404 'material-ui-codemod' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
- When trying to use version downloaded from Github with
find app -name '*.jsx' -print | xargs jscodeshift -t node_modules/material-ui-codemod/transforms/v0.15.0/import-path.js
I see
Processing 1 files...
Spawning 1 workers...
Sending 1 files to free worker...
/xxx/node_modules/material-ui-codemod/transforms/v0.15.0/import-path.js:73
export default function transformer(file, api) {
^^^^^^
SyntaxError: Unexpected token export
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Module._extensions..js (module.js:422:10)
at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/jscodeshift/node_modules/babel-core/lib/api/register/node.js:214:7)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at setup (/usr/local/lib/node_modules/jscodeshift/dist/Worker.js:60:15)
at Object.<anonymous> (/usr/local/lib/node_modules/jscodeshift/dist/Worker.js:52:3)
Versions
- Material-UI: 0.15.0-beta.1
- React: 15.0.1
- Node.js 5.6.0
- npm 3.6.0
- OS X 10.11.4
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:5 (3 by maintainers)
Top Results From Across the Web
mui/material-ui - [docs] Problems with running codemod - GitHub
I spent about 3 hours trying to upgrade my project from v4 to v5 and then I gave up. There are all the...
Read more >@material-ui/codemod - npm
Start using @material-ui/codemod in your project by running `npm i @material-ui/codemod`. There are 11 other projects in the npm registry ...
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 >Troubleshooting - Material UI - MUI
This document covers known issues and common problems encountered when migrating ... We recommend using this codemod to fix all imports in your...
Read more >@material-ui/codemod - npm Package Health Analysis | Snyk
Learn more about @material-ui/codemod: package health score, popularity, security, ... Codemod scripts for Material-UI. ... No known security issues.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@abelozerov @oliviertassinari Were you able to solve this error? I’m facing the same error right now.
@kylefinley Nice feedback. Let’s see if I can fix this.