react-native 上传文件到 Supabase

Supabase 是一个全栈解决方案,它包括了数据库、身份验证、实时更新、存储等服务,适合那些希望减少开发时间和复杂性的应用。

最近在找一个能免费存储的服务商,自己搭的应用,不想写后端,也不想乱七八糟的各种环境的部署。选来选去选择了Supabase

https://github.com/supabase/supabase

74.9K⭐️,懂得都懂 …

Snipaste 2024 12 12 10 13 50

阅读更多

react-native pod install 失败问题汇总

最新版0.76.3报错 …

这个具体的报错信息没给,参考

https://github.com/facebook/react-native/issues/34189

Debugging this issue on my M1 mac, I discovered that I had never set my git config to use the correct line endings for *nix on macOS. UPDATE: I had actually forgotten to unset them after working with a repo with Windows line endings. This means they were set to git config --global core.autocrlf true which is the setting for windows.

This is the correct setting for linux/mac.

git config --global core.autocrlf input

You can also unset them and use the default which is false

git config --global --unset core.autocrlf

After this, you will need to normalize all the line endings in the project (unless you want to re-clone).

https://stackoverflow.com/a/13154031

After you have done the configuration, you might want git to normalize all the files in the repo. To do this, go to to the root of your repo and run these commands:

git rm --cached -rf .
git diff --cached --name-only -z | xargs -n 50 -0 git add -f

If you now want git to also normalize the files in your working directory, run these commands:

git ls-files -z | xargs -0 rm
git checkout .

There are some .bat files for windows that you will not want to change, so discard those.

Once you have done these steps, you shouldn’t need any of the custom workarounds in this thread.

Originally posted by @shwanton in https://github.com/facebook/react-native/issues/34189#issuecomment-1502532287

阅读更多

Flutter Text 文字没有居中

今天遇见一个坑爹的问题,就一个小小的 Tag,外面加了一个边框,里面套了一个Text,如果边框放大,其实根本看不出来,但是文字缩小,变宽内边距缩小就看出问题来了,根本不居中,他奶奶的各种Center Align嵌套都不好使 …

Snipaste 2024 03 25 17 47 33

阅读更多

Error installing lottie-ios

iOS安装lottie报错:

[!] Error installing lottie-ios
[!] /usr/local/bin/git clone https://github.com/airbnb/lottie-ios.git /var/folders/s4/d4hj6wbj1_j3w4ynthv1klf80000gn/T/d20240201-9298-1c37cjq --template= --single-branch --depth 1 --branch 4.4.0

正克隆到 '/var/folders/s4/d4hj6wbj1_j3w4ynthv1klf80000gn/T/d20240201-9298-1c37cjq'...
error: RPC 失败。curl 56 Recv failure: Connection reset by peer
error: 预期仍然需要 5466 个字节的正文
fetch-pack: unexpected disconnect while reading sideband packet
fatal: 过早的文件结束符(EOF)
fatal: index-pack 失败
阅读更多

tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

新项目执行pod install报错 …

xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance

➜  ios git:(main) ✗ pod install
Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2
Auto-linking React Native modules for target `DuoleGameHelper`: RNCAsyncStorage, RNGestureHandler, RNScreens, and react-native-safe-area-context
Framework build type is static library
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[Codegen] Found rncore
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
[!] Failed to load 'glog' podspec:
[!] Invalid `glog.podspec` file: undefined method `[]' for nil:NilClass.

# from /Users/sunyg/DuoleGameHelper/node_modules/react-native/third-party-podspecs/glog.podspec:38
# -------------------------------------------
# match = xcode_path.match(/Xcode (\d+)\.(\d+)/)
> major_version = match[1].to_i
# minor_version = match[2].to_i
# -------------------------------------------
阅读更多

Unable to resolve module `./debugger-ui/debuggerWorker.d9da4ed7` from ``

公司的祖传代码升级,升级完了没法调试了 …

Error: Unable to resolve module `./debugger-ui/debuggerWorker.d9da4ed7` from ``:

None of these files exist:
* debugger-ui/debuggerWorker.d9da4ed7(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
* debugger-ui/debuggerWorker.d9da4ed7/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
at ModuleResolver.resolveDependency (/Users/sunyg/marineonline-mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
at ResolutionRequest.resolveDependency (/Users/sunyg/marineonline-mobile/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
at DependencyGraph.resolveDependency (/Users/sunyg/marineonline-mobile/node_modules/metro/src/node-haste/DependencyGraph.js:282:16)
at /Users/sunyg/marineonline-mobile/node_modules/metro/src/lib/transformHelpers.js:267:42
at /Users/sunyg/marineonline-mobile/node_modules/metro/src/Server.js:1305:37
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Users/sunyg/marineonline-mobile/node_modules/metro/src/Server.js:99:24)
at _next (/Users/sunyg/marineonline-mobile/node_modules/metro/src/Server.js:119:9)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
::ffff:192.168.210.117 - - [18/Jan/2024:03:06:50 +0000] "POST /symbolicate HTTP/1.1" 500 - "-" "okhttp/4.8.1"
BUNDLE [android, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.

他奶奶的我就知道绝对是这个坑货搞的鬼 …

https://github.com/facebook/metro/issues/731

Snipaste 2024 01 18 11 16 43

阅读更多