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 module @react-native-community/push-notification-ios from ~/Code/React/MYS_Copy/node_modules/react-native-push-notification/component/index.ios.js #1176

Closed
tholhubner opened this issue Aug 15, 2019 · 7 comments
Labels

Comments

@tholhubner
Copy link

I am in the middle of upgrading our project to 0.60.5 and I am now running into this issue:

Unable to resolve module `@react-native-community/push-notification-ios` from `/Users/tholhubner/Code/React/MYS_Copy/node_modules/react-native-push-notification/component/index.ios.js`

I have the dependency installed and I am completely up to date on this package as well, but I still seem to be getting this error. I have done all the typical steps, clearing watchman, removing node_modules, clearing npm caches, but nothing seems to solve this issue.

If anyone has any suggestions, please send them my way.

@tholhubner tholhubner changed the title Unable to resolve module @react-native-community/push-notification-ios from /Users/tholhubner/Code/React/MYS_Copy/node_modules/react-native-push-notification/component/index.ios.js Unable to resolve module @react-native-community/push-notification-ios from ~/Code/React/MYS_Copy/node_modules/react-native-push-notification/component/index.ios.js Aug 16, 2019
@quynhnvicts
Copy link

Have you solved this issue? I am now running into this issue too.

@ghost
Copy link

ghost commented Sep 6, 2019

I found the solution, you can try to delete

  resolver: {
    blacklistRE: blacklist([
      // Refs: https://github.com/facebook/metro/issues/265
      /ios\/.*/,
      /android\/.*/,
      /__tests?__\/.*/,
      /__mocks?__\/.*/,
    ]),
}

in metro.config.js

@alvaro1728
Copy link

alvaro1728 commented Sep 19, 2019

@nhiicts I removed that whole "resolver" section but it didn't help.

@13thdeus
Copy link

13thdeus commented Nov 7, 2019

Any update on this issue?

@davidvmckay
Copy link

@nhiicts I removed that whole "resolver" section but it didn't help.

in my case, when I deleted the "resolver" section my app still refused to load.... but it was because I needed some of the blacklist entries for proper bundling. this is what i ended up with that allowed the react-native-community/push-notification-ios package to be resolved by metro:

// https://github.com/janeasystems/nodejs-mobile-react-native/tree/ed727edea17e8a9e1a85cef3413becc83b8a0328#duplicate-module-name
// https://github.com/facebook/metro/issues/265#issuecomment-424334996
const blacklist = require('metro-config/src/defaults/blacklist');

module.exports = {
  resolver:{
    blacklistRE: blacklist([
      // /node_modules\/.*\/node_modules\/react-native\/.*/,
      /nodejs-assets\/.*/,
      /CodePush\/.*/,
      /android\/.*/,
      // /ios\/.*/
    ])
  },
};

@betopompolo
Copy link

@tholhubner i was running into the same issue, but this lib uses the @react-native-community/push-notification-ios (as stated in installation instructions).

I think this issue can be closed.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

6 participants