admin管理员组文章数量:1195291
terminal Screenshot of error
I'm attempting to integrate SQLite into my Expo project using expo-sqlite. However, when I run the project, I encounter the following error:
(NOBRIDGE) ERROR Error: Cannot find native module 'ExpoSQLite' [Component Stack]
(NOBRIDGE) WARN Route "./note/index.tsx" is missing the required default export. Ensure a React component is exported as default. [Component Stack]
Steps Taken:
- Installed expo-sqlite using
npx expo install expo-sqlite
- Followed the basic usage instructions from the expo-sqlite documentation
Expected Behavior: The project should run successfully and allow me to interact with the SQLite database as per the expo-sqlite documentation.
Environment:
- Expo SDK Version: 52.0.23
- Tinybase Version: 5.4.5
Code Snippet (if applicable):
export default function NoteApp(){
const store = useCreateStore(createStore);
useAndStartPersister(store);
return(
// TSX
)
}
const useAndStartPersister = (store : any) =>
// Persist store to Expo SQLite or local storage; load once, then auto-save.
useCreatePersister(
store,
(store) =>
Platform.OS === 'web'
? createLocalPersister(store, 'todos')
: createExpoSqlitePersister(store, SQLite.openDatabaseSync('todos.db')),
[],
// @ts-ignore
(persister) => persister.load().then(persister.startAutoSave)
);
I have tried reinstalling node modules, clearing cache, etc.
Expected Behavior: The project should run successfully and allow me to interact with the SQLite database as per the expo-sqlite documentation.
本文标签: Problem SQLite Module on Expo React NativeStack Overflow
版权声明:本文标题:Problem SQLite Module on Expo React Native - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738489192a2089605.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论