When i run react-native-git-upgrade to update my react native project the updater stuck at
git-upgrade ERR! Error: Cannot find module 'F:\Projet_Node-Js\SmartWork\smartwork\node_modules\react-native\local-cli\generator\copyProjectTemplateAndReplace'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
at Function.resolve (internal/modules/cjs/helpers.js:28:19)
at runCopyAndReplace (C:/Users/Michel/AppData/Local/Yarn/Data/global/node_modules/react-native-git-upgrade/cliEntry.js:163:32)
at generateTemplates (C:/Users/Michel/AppData/Local/Yarn/Data/global/node_modules/react-native-git-upgrade/cliEntry.js:151:12)
at Object.<anonymous> (C:/Users/Michel/AppData/Local/Yarn/Data/global/node_modules/react-native-git-upgrade/cliEntry.js:288:11)
at Generator.next (<anonymous>)
at step (C:\Users\Michel\AppData\Local\Yarn\Data\global\node_modules\react-native-git-upgrade\cliEntry.js:171:191)
at C:\Users\Michel\AppData\Local\Yarn\Data\global\node_modules\react-native-git-upgrade\cliEntry.js:171:361
at tryCallOne (C:\Users\Michel\AppData\Local\Yarn\Data\global\node_modules\promise\lib\core.js:37:12)
at C:\Users\Michel\AppData\Local\Yarn\Data\global\node_modules\promise\lib\core.js:123:15
Run react-native-git-upgrade
The updater will not update your react native app and it will crash with the error i give you up
$ react-native info
info
React Native Environment Info:
System:
OS: Windows 10
CPU: (6) x64 Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz
Memory: 6.03 GB / 15.95 GB
Binaries:
Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.5.0 - C:\Program Files\nodejs\npm.CMD
Thank you for your help !
We no longer recommend using react-native-git-upgrade
. You can take a look at https://github.com/react-native-community/rn-diff-purge which includes a list of changes between various versions. Once you've updated to 0.59 manually using that method, you will be able to use the new react-native upgrade
.
See http://facebook.github.io/react-native/blog/#upgrading-to-059 for more details.
@hramos when you run react-native-upgrade
, it still tells you to use react-native-git-upgrade
. Could this be removed? I wasted a lot of time trying to get that to work when react-native-upgrade would have been correct.
➜ OmaApp git:(upgrade-rn) react-native upgrade
Scanning folders for symlinks in /Users/sophia/Projects/OmaApp/node_modules (20ms)
You should consider using the new upgrade tool based on Git. It makes upgrades easier by resolving most conflicts automatically.
To use it:
- Go back to the old version of React Native
- Run "npm install -g react-native-git-upgrade"
- Run "react-native-git-upgrade"
See https://facebook.github.io/react-native/docs/upgrading.html
Thank you for letting me do all this * quest angry
Most helpful comment
@hramos when you run
react-native-upgrade
, it still tells you to usereact-native-git-upgrade
. Could this be removed? I wasted a lot of time trying to get that to work when react-native-upgrade would have been correct.➜ OmaApp git:(upgrade-rn) react-native upgrade
Scanning folders for symlinks in /Users/sophia/Projects/OmaApp/node_modules (20ms)
You should consider using the new upgrade tool based on Git. It makes upgrades easier by resolving most conflicts automatically.
To use it:
- Go back to the old version of React Native
- Run "npm install -g react-native-git-upgrade"
- Run "react-native-git-upgrade"
See https://facebook.github.io/react-native/docs/upgrading.html