6

I've gotten this with two separate RN native libs that I'm trying to integrate. There must be some setting that is causing the

rnpm-install info Linking react-native-keep-awake android dependency
rnpm-install ERR! Something went wrong while linking. Error: ENOENT: no such file or directory, open '/Users/Me/Projects/project-name/android/app/src/main/java/com/company-name/project-name/MainApplication.java'
Please file an issue here: https://github.com/facebook/react-native/issues

ENOENT: no such file or directory, open '/Users/Me/Projects/project-name/android/app/src/main/java/com/company-name/project-name/MainApplication.java'

Instead of com/company-name/project-name/MainApplication.java, I have com/project-name/MainApplication.java. How can I get react-native link to find MainApplication.java in this directory, or how can I change my directory structure to match what RN is trying to find?

3
  • 3
    When I had linking issues I had to rm -rf node modules then reinstall with YARN not NPM Commented Dec 16, 2017 at 23:13
  • ^ that worked for me Commented May 9, 2018 at 3:11
  • Does not work for me :( Commented Sep 24, 2018 at 13:00

1 Answer 1

2
npm install --save-dev babel-plugin-module-resolver

or if using yarn

yarn add --dev babel-plugin-module-resolver

helps for me

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.