Skip to content

Unable to resolve a haste module after upgrading to React Native 0.56 #200

Description

@jsdario

Until React Native 0.55 –included– I could call import {something} from 'hasteModuleSomething', where hasteModuleSomething.js existed and had the following lines on the top:

/**
* @providesModule hasteModuleSomething
* @flow
*/

It also breaks the test suite, that uses jest.

What is the expected behavior?
I should be able to keep using the current haste modules architecture, at least while the company moves slowly towards a more conventional imports strategy.

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.

// rn-cli.config.js
const blacklist = require('metro/src/blacklist')

module.exports = {
  getBlacklistRE () {
    return blacklist([/react-native\/local-cli\/core\/__fixtures__.*/])
  },
}

Building from a MacOSX, Node.js v8.13, yarn v1.7.0, React v16.4

If this is not a bug (probably is a design decision) could you give me some directions on how to recover the functionality? I opened a SO question in such case, so the correct answer can be rewarded.

https://stackoverflow.com/questions/51378995/unable-to-resolve-a-haste-module-after-upgrading-to-react-native-0-56

Thanks

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