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

Autolinking does not work with React Native 0.69.0 #881

Closed
Naturalclar opened this issue Jun 24, 2022 · 11 comments · Fixed by #882
Closed

Autolinking does not work with React Native 0.69.0 #881

Naturalclar opened this issue Jun 24, 2022 · 11 comments · Fixed by #882

Comments

@Naturalclar
Copy link
Contributor

Issue

Due to change in react-native cli, react-native-community/cli#1537
Autolinking is no longer working with React Native 0.69

Expected Behavior

React Native autolinking to work with RNNotifications

Repro Steps:

  • Create a new React Native Project version 0.69
  • install react-native-notifications
  • run pod install in ios directory

Notice that RNNotifications is not included in the Podfile.lock

Repro repository
https://github.com/Naturalclar/react-native-notifications-repro

@alexanderoskin
Copy link

Same.

Due to react-native-community/cli#1537 some things in react-native.config.js have been deprecated and removed, thus failing autolinking schema validation (for example dependency.assets).

Steps to Reproduce

Create a vanilla RN project with latest 0.69.1 with npx react-native init Example.
Add this package.
Observe it not being autolinked.

@stale
Copy link

stale bot commented Aug 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the 🏚 stale label Aug 10, 2022
@haleyngonadi
Copy link

Bumping! I'm also facing the same issue with 69.1

Running npx react-native run-ios returns an error:

warn Package react-native-notifications contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.

@stale stale bot removed the 🏚 stale label Aug 10, 2022
@nguyendinhdoan
Copy link

I'm getting the same issue
warn Package react-native-notifications contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.

@Erik-Schlegel
Copy link

Erik-Schlegel commented Aug 28, 2022

Same issue with react native 69.1 regarding "dependency.assets".

@03Farhan
Copy link

03Farhan commented Sep 1, 2022

You can make a patch using changes from #882. Hopefully that change is merged soon, but in the meantime you can do this:

  1. install patch-package
  2. create a folder in your project called "patches"
  3. inside "patches" create a file named react-native-notifications+4.3.1.patch with the following content:
diff --git a/node_modules/react-native-notifications/react-native.config.js b/node_modules/react-native-notifications/react-native.config.js
index 437783b..d246b0c 100644
--- a/node_modules/react-native-notifications/react-native.config.js
+++ b/node_modules/react-native-notifications/react-native.config.js
@@ -7,7 +7,6 @@ module.exports = {
         packageInstance: 'new RNNotificationsPackage(reactNativeHost.getApplication())',
       }
     },
-    assets: []
   },
   project: {
     ios: {

  1. add "patch-package" in postinstall in package.json before doing yarn install.
    package.json:
"scripts": {
    ...
    "postinstall": "patch-package"
}
  1. run yarn install or npm install

@xtovski
Copy link

xtovski commented Sep 17, 2022

Same thing on RN 0.7.0, with react-native-notifications 4.3.1

warn Package react-native-notifications contains invalid configuration: "dependency.assets" is not allowed. 
Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.

@stale
Copy link

stale bot commented Oct 18, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the 🏚 stale label Oct 18, 2022
@stale
Copy link

stale bot commented Oct 28, 2022

The issue has been closed for inactivity.

@stale stale bot closed this as completed Oct 28, 2022
@ajithes1
Copy link

ajithes1 commented Dec 1, 2022

+1

@ZiaSoltani2023
Copy link

any update on this issue still facing it.
Thanks

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

Successfully merging a pull request may close this issue.

9 participants