OP-Engineering / op-sqlite

Fastest SQLite library for react-native by @ospfranco
MIT License
603 stars 40 forks source link

Update Libsql libraries #120

Closed haaawk closed 4 months ago

haaawk commented 4 months ago

Unfortunately, I wasn't able to run the example tests because one of the steps from [the instruction list] (https://ospfranco.notion.site/Libsql-4dbbf5793f654eccb9f5f68901224e97) fails for me:

╰──> npx pod-install@latest
Scanning for pods...
1.15.2
> pod install

[!] Invalid `Podfile` file: undefined method `[]' for nil.

 #  from /Users/haaawk/work/op-sqlite/example/ios/Podfile:16
 #  -------------------------------------------
 #  target 'OPSQLiteExample' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
> pod install --repo-update

[!] Invalid `Podfile` file: undefined method `[]' for nil.

 #  from /Users/haaawk/work/op-sqlite/example/ios/Podfile:16
 #  -------------------------------------------
 #  target 'OPSQLiteExample' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: undefined method `[]' for nil.

 #  from /Users/haaawk/work/op-sqlite/example/ios/Podfile:16
 #  -------------------------------------------
 #  target 'OPSQLiteExample' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------

pod install --repo-update --ansi exited with non-zero code: 1
haaawk commented 4 months ago

Also:

╰──> yarn run android
error: unknown command 'run-android'

and

╰──> yarn ios
error: unknown command 'run-ios'
ospfranco commented 4 months ago

Did you do a yarn install in the example folder as well?

haaawk commented 4 months ago

Did you do a yarn install in the example folder as well?

Yes, I run yarn install in both top level and example

ospfranco commented 4 months ago

It is saying it cannot find the method use_native_modules which is part of the react-native package. Please do try yarn install and not just yarn, on both the root and the example folders. I might have made something to the invocation that breakss.

haaawk commented 4 months ago
╭─[~/work/op-sqlite]
╰──> yarn install        
➤ YN0088: A new stable version of Yarn is available: 4.3.1!
➤ YN0088: Upgrade now by running yarn set version 4.3.1

➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 240ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 637ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0s 489ms
➤ YN0000: · Done in 1s 544ms
╭─[~/work/op-sqlite]
╰──> cd -
~/work/op-sqlite/example
╭─[~/work/op-sqlite/example]
╰──> yarn install
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 236ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 630ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0s 499ms
➤ YN0000: · Done in 1s 548ms
╭─[~/work/op-sqlite/example]
╰──> bundle install          
Bundle complete! 2 Gemfile dependencies, 39 gems now installed.
Bundled gems are installed into `./vendor/bundle`
╭─[~/work/op-sqlite/example]
╰──> npx pod-install@latest                          
Scanning for pods...
1.15.2
> pod install

[!] Invalid `Podfile` file: undefined method `[]' for nil.

 #  from /Users/haaawk/work/op-sqlite/example/ios/Podfile:16
 #  -------------------------------------------
 #  target 'OPSQLiteExample' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
> pod install --repo-update

[!] Invalid `Podfile` file: undefined method `[]' for nil.

 #  from /Users/haaawk/work/op-sqlite/example/ios/Podfile:16
 #  -------------------------------------------
 #  target 'OPSQLiteExample' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: undefined method `[]' for nil.

 #  from /Users/haaawk/work/op-sqlite/example/ios/Podfile:16
 #  -------------------------------------------
 #  target 'OPSQLiteExample' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------

pod install --repo-update --ansi exited with non-zero code: 1
ospfranco commented 4 months ago

I did a clean clone of the project and did:

After ios ran, launched an android emulator (because latest versions are broken) and then just yarn android

Will merge, but would be good to debug your machine, I can make some time next week to give a hand. Also, it would be ideal to at least add a build ci check with libsql enabled.

haaawk commented 4 months ago

yarn example does not work for me

╭─[~/work/op-sqlite/example]
╰──> yarn example
Usage Error: Couldn't find a script named "example".

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
ospfranco commented 4 months ago

sorry, I meant yarn install