Skip to content

Incorrect dependency version for React needed for React Native 0.43 #893

@nicinabox

Description

@nicinabox

React Native 0.43 has a peer dependency on React 16.0.0-alpha.6, but react-compat doesn't check for major versions greater than 15.

This has the lovely effect of having the app compile and run successfully, but all the tests fail because it enzyme resolves to [email protected].

It looks like this should be fairly straightforward. I could probably draft a PR tomorrow if need be.

Here's the full error:

react-addons-test-utils is an implicit dependency in order to support [email protected]. Please add the appropriate version to your devDepen
dencies. See https://github.com/airbnb/enzyme#installation
/Users/haynesn/code/CrimsonConnect/node_modules/enzyme/build/react-compat.js:143
      throw e;
      ^

Error: Cannot find module 'react-addons-test-utils'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at /Users/haynesn/code/CrimsonConnect/node_modules/enzyme/build/react-compat.js:133:21
    at Object.<anonymous> (/Users/haynesn/code/CrimsonConnect/node_modules/enzyme/build/react-compat.js:219:5)

[snip]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions