Cannot find module 'AccessibilityInfo'



  • git-upgrade info Check for updates 
    git-upgrade info Read package.json files 
    git-upgrade info Check declared version 
    git-upgrade info Check matching versions 
    git-upgrade info Check React peer dependency 
    git-upgrade info Check that Git is installed 
    git-upgrade info Get information from NPM registry 
    git-upgrade info Upgrading to React Native 0.55.4, React 16.3.1 
    git-upgrade info Setup temporary working directory 
    git-upgrade info Configure Git environment 
    git-upgrade info Init Git repository 
    git-upgrade info Add all files to commit 
    git-upgrade info Commit current project sources 
    git-upgrade info Create a tag before updating sources 
    git-upgrade info Generate old version template 
    git-upgrade ERR! An error occurred during upgrade: 
    git-upgrade ERR! Error: Cannot find module 'AccessibilityInfo' (While processing preset: "/Users/chen/ReactNative/ProgramKids1/node_modules/react-native/Libraries/react-native/react-native-implementation.js")
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
        at Function.Module._load (internal/modules/cjs/loader.js:475:25)
        at Module.require (internal/modules/cjs/loader.js:598:17)
        at require (internal/modules/cjs/helpers.js:11:18)
        at Object.get AccessibilityInfo [as AccessibilityInfo] (/Users/chen/ReactNative/ProgramKids1/node_modules/react-native/Libraries/react-native/react-native-implementation.js:17:36)
        at /usr/local/lib/node_modules/react-native-git-upgrade/node_modules/lodash/_baseClone.js:163:23
        at arrayEach (/usr/local/lib/node_modules/react-native-git-upgrade/node_modules/lodash/_arrayEach.js:15:9)
        at baseClone (/usr/local/lib/node_modules/react-native-git-upgrade/node_modules/lodash/_baseClone.js:160:3)
        at cloneDeepWith (/usr/local/lib/node_modules/react-native-git-upgrade/node_modules/lodash/cloneDeepWith.js:37:10)
        at OptionManager.mergeOptions (/usr/local/lib/node_modules/react-native-git-upgrade/node_modules/babel-core/lib/transformation/file/options/option-manager.js:206:44) 
    git-upgrade ERR! Restore initial sources 
    Note: checking out 'project-snapshot'.
    
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:
    
      git checkout -b <new-branch-name>
    
    HEAD is now at 87e24c1... Project snapshot
    

    在升级到 react-native:0.55.4的时候,遇到了上述问题,怎么解决?有人遇到过吗?