Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jsdario opened this issue Jul 17, 2018 · 4 comments
Closed

Comments

@jsdario
Copy link

jsdario commented Jul 17, 2018

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

@nitrosalat
Copy link

nitrosalat commented Aug 29, 2018

@jsdario did you resolve this issue? I encountered the same issue at the same environment configuration.

@jsdario
Copy link
Author

jsdario commented Aug 29, 2018

I have not, I did change all imports to other structure with ~100 search and replace operations

@rafeca
Copy link
Contributor

rafeca commented Oct 4, 2018

Thanks for reporting! This has been fixed on RN 0.57.0

@rafeca rafeca closed this as completed Oct 4, 2018
@arled
Copy link

arled commented Jun 4, 2019

and broken again in RN 0.57.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants