Open tansaku opened 6 years ago
I can see another project having these same issues: https://github.com/prescottprue/generator-react-firebase/pull/25 looks like we might require upgrades to material-ui and react-tap-event-plugin ...?
it's looking like the trick will be to get the material-ui and react-tap-event-plugins at just the right version so that they work with react 15.6, which I now appear to have done with the versions 0.19.4 and 2.0.1 respectively, however this leads to a new round of errors e.g.
ERROR in ./app/assets/javascripts/app.js
Module not found: Error: Can't resolve 'material-ui/lib/styles/theme-manager' in '/Users/tansaku/Documents/GitHub/First-Peoples-Cultural-Council/fv-web-ui/app/assets/javascripts'
@ ./app/assets/javascripts/app.js 44:20-67
@ multi ./app.js webpack-dev-server/client?http://0.0.0.0:3001 webpack/hot/only-dev-server
ah, although perhaps we can make intermediate process by backing out to material-ui 0.14.4 - aha we can. That allows me to get a version of the site that compiles, although I immediately notice some problems in terms of text being displayed on the site:
but good to see a compiling version on react 15.6 --- follow up would now be a complete review of the site to see what other functionality was affected by the upgrade before pursuing upgrade to higher react or the material upgrade which looks like it will need a fair few adaptations
although clicks on links not working at all despite compilation, and these errors in the console:
Following instructions at https://docs.mobify.com/progressive-web/latest/upgrades/react-16/#upgrade-react-16-2
The instructions regarding installing jcodeshift were a little unclear in terms of what was meant by a
/web
directory, which the project does not have. In the first instance added aweb/
dir and installed codshift there.The instructions for npm install and removals were replaced with the corresponding yarn operations:
although the latter did not complete successfully indicating that that package was not installed to start with.
Moving on to adapting the components, jscodeshift was not available globally, so forced it in with:
Then got this error:
so moved the react-codemod folder to the root which allowed this to run (after also noting that the components are not in the app but in app/assets/javascript/views) but got the following errors:
https://gist.github.com/tansaku/668de5c61c32a728725d82d81eac1cb4
So did the change manually using VSCode replace ..., which appeared to go smoothly - only a 100 or so matches.
now looking at the proptypes, that's more problematic as there appear to be a very large number of these and it's unclear that the jscodeshift is working, although despite further errors (maybe only warnings) it appears to have worked ..., and the rest of the steps appear to be related to testing or libraries that we're not using ...
Still the app doesn't compile - we get the following errors that may have to be tracked down individually ...: