andpor / react-native-sqlite-storage

Full featured SQLite3 Native Plugin for React Native (Android and iOS)
MIT License
2.76k stars 520 forks source link

TypeError: null is not an object #477

Open kroggen opened 3 years ago

kroggen commented 3 years ago

This appears when clicking on "Run demo" button from the sample/test demo:

TypeError: null is not an object (evaluating 'NativeModules["SQLite"][method]')
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0
at [native code]:null in flushedQueue
at [native code]:null in invokeCallbackAndReturnFlushedQueue

Steps to Reproduce

expo init first-test
<select: blank>
cd first-test
npm i react-native-sqlite-storage
npm i deprecated-react-native-listview
cp node_modules/react-native-sqlite-storage/test/index.android.json1.js App.js

Then rename this line:

class SQLiteDemo extends Component {

to this:

export default class App extends Component {

Run:

expo start
a

Then on the emulator click on "Run demo"

Your Environment

This problem happens on both Android and iOS