When npx react-native start — –reset-cache
warn Package react-native-sqlite-storage contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it’s properly linked using "react-native config" command and contact the package maintainers about this.
My configs:
"react-native-sqlite-storage": "^3.3.3", // Latest as of now
react-native.config.js:
module.exports = {
dependency: {
platforms: {
ios: {
project: './platforms/ios/SQLite.xcodeproj'
},
android: {
sourceDir: './platforms/android'
},
windows: {
sourceDir: './platforms/windows',
solutionFile: 'SQLitePlugin.sln',
projects: [
{
projectFile: 'SQLitePlugin/SQLitePlugin.vcxproj',
directDependency: true,
}
],
}
}
}
}
Error:
2
Answers
react-native.config.js: commend or delete part of ios
}
First of all, make sure that you have the following config in the
react-native.config.js
file:NOTE
If you do not have the
react-native.config.js
file in the root of your project, feel free to create it and put the config above in it.Then, do the following steps
1-Set up patch-package for your project
2-Open
node_modules/react-native-sqlite-storage/react-native.config.js
3-Edit as follows
to
4-Run
npx patch-package react-native-sqlite-storage
at terminal5-patch-package makes
react-native-sqlite-storage+6.0.1.patch
and add it to{$root}/patches
6-Build your project!
Thanks to Mitsuharu Emoto for sharing the code.