Closed Naturalclar closed 2 years ago
Same.
Due to https://github.com/react-native-community/cli/pull/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.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
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.
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.
Same issue with react native 69.1 regarding "dependency.assets".
You can make a patch using changes from https://github.com/wix/react-native-notifications/pull/882. Hopefully that change is merged soon, but in the meantime you can do this:
patch-package
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: {
4. add "patch-package" in postinstall in package.json before doing yarn install.
`package.json`:
"scripts": { ... "postinstall": "patch-package" }
5. run `yarn install` or `npm install`
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.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
The issue has been closed for inactivity.
+1
any update on this issue still facing it. Thanks
Issue
Due to change in react-native cli, https://github.com/react-native-community/cli/pull/1537 Autolinking is no longer working with React Native 0.69
Expected Behavior
React Native autolinking to work with RNNotifications
Repro Steps:
ios
directoryNotice that RNNotifications is not included in the Podfile.lock
Repro repository https://github.com/Naturalclar/react-native-notifications-repro