craftzdog / pouchdb-adapter-react-native-sqlite

PouchDB adapter using ReactNative SQLite as its backing store

Home Page:https://github.com/craftzdog/pouchdb-react-native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Working Demo App doesn't work

CDBridger opened this issue · comments

Cloned the app couldn't run it.

npm install
npx react-native run-ios

get error:

The following commands produced analyzer issues:
	Analyze /Users/*****/Documents/pouchdb-react-native-demo/node_modules/react-native/ReactCommon/jsi/jsi.cpp normal x86_64
	Analyze /Users/*****/Documents/pouchdb-react-native-demo/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp normal x86_64
	Analyze /Users/*****/Documents/pouchdb-react-native-demo/node_modules/react-native/React/Base/RCTModuleMethod.mm normal x86_64
(3 commands with analyzer issues)

The following build commands failed:
	Ld /Users/*****/Documents/pouchdb-react-native-demo/ios/build/Sqlite3Demo/Build/Products/Debug-iphonesimulator/Sqlite3Demo.app/Sqlite3Demo normal
(1 failure)

using xcode 12.3
simulator: iPhone 11 running iOS 14..3

EDIT:

In fact

npm install

doesn't even work

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@4.0.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The issue is that the websql dependency has a dependency on sqlite3 4.X which is not compatible with node v14.

The fix is to manually install Sqlite3 5.X or greater for those with this issue

e.g

npm install sqlite3@latest