Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Libsql libraries #120

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

haaawk
Copy link
Contributor

@haaawk haaawk commented Jul 9, 2024

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

Signed-off-by: Piotr Jastrzebski <[email protected]>
@haaawk
Copy link
Contributor Author

haaawk commented Jul 9, 2024

Also:

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

and

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

@ospfranco
Copy link
Contributor

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

@haaawk
Copy link
Contributor Author

haaawk commented Jul 9, 2024

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

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

@ospfranco
Copy link
Contributor

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
Copy link
Contributor Author

haaawk commented Jul 10, 2024

╭─[~/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
Copy link
Contributor

ospfranco commented Jul 10, 2024

I did a clean clone of the project and did:

  • yarn install
  • cd example
  • yarn install
  • modified the package.json to contain libsql: true
  • bundle install
  • yarn pods (should be the same as npx pod-install@latest it's just nuking the Pods folder)
  • yarn ios

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.

@ospfranco ospfranco merged commit e0dfd08 into OP-Engineering:main Jul 10, 2024
5 checks passed
@haaawk
Copy link
Contributor Author

haaawk commented Jul 10, 2024

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
Copy link
Contributor

sorry, I meant yarn install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants