Troubles after upgrading react-native to 0.56

时间:2018-07-24 10:19:25

标签: reactjs facebook react-native

i have troubles updating the new version of react-native which appears to improve vastly and a lot of features.

After reading this article : https://facebook.github.io/react-native/blog/2018/07/04/releasing-react-native-056

I've started to run this command : https://facebook.github.io/react-native/docs/upgrading.html

All goes well, the application is built after running react-native run-ios

The problem is the bundle which is buggy :

node node_modules/react-native/local-cli/cli.js start "--reset-cache" Scanning folders for symlinks in /Users/julestruong/Dev/BAP/flex/v1/flex-mobile-app/node_modules (14ms) warning: the transform cache was reset.

Cannot find module 'metro/src/transformer'

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! flex@0.0.1 start: node node_modules/react-native/local-cli/cli.js start "--reset-cache" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the flex@0.0.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Tries :

  • remove node_modules
  • start --reset-cache
  • delete package-lock.json and reinstall.

Nothing works ...

1 个答案:

答案 0 :(得分:0)

如果您使用的是打字稿,则需要将react-native-typescript-transformer升级到1.2.10,因为Metro移走了它依赖的变压器。