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

metro-react-native-babel-preset Unable to resolve module if imported from package.json like so "react-native-package": "file:../" #312

Open
adhax opened this issue Nov 9, 2018 · 2 comments

Comments

@adhax
Copy link

adhax commented Nov 9, 2018

Do you want to request a feature or report a bug?
bug report

Environment:
"react": "16.6.1",
"react-native": "0.57.4",
"metro-react-native-babel-preset": "0.48.1"
To Fix my issue I had to downgrade to react native 0.56.1 and use babel-preset-react-native

What is the current behavior?
metro-react-native-babel-preset Unable to resolve module if imported from package.json like so "react-native-package": "file:../"

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.
The best way to reproduce my situation is to clone https://github.com/Traviskn/react-native-uuid-generator and use the newer version of react native in the example folder

What is the expected behavior?
Import the default object from react-native-package and use it

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
Node: 11.1.0
Npm: 6.4.1
MacOS Mojave

@RomualdPercereau
Copy link

Probably related to
#257
#288
jestjs/jest#6993

Any fix is planned? This behaviour is very common.

@aleclarson
Copy link
Contributor

Symlinks are not supported in node_modules until #257 is merged.

Using file: in your dependencies will create a symlink in your node_modules.

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

3 participants