react-native-async-storage / async-storage

An asynchronous, persistent, key-value storage system for React Native.
https://react-native-async-storage.github.io/async-storage/
MIT License
4.61k stars 458 forks source link

"react-native-macos" app fails to compile after adding async-storage to it. #1058

Closed dcorbin closed 2 months ago

dcorbin commented 4 months ago

What happened?

Compiling the app fails with: The following build commands failed: CompileC /Users/dcorbin/Library/Developer/Xcode/DerivedData/KitPrintCoordinator-ezdhuxuodzjielchgcwmwahuypxr/Build/Intermediates.noindex/Pods.build/Debug/React-Codegen.build/Objects-normal/arm64/FBReactNativeSpecJSI-generated.o /Users/dcorbin/projects/KitPrintCoordinator/macos/build/generated/ios/FBReactNativeSpecJSI-generated.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-Codegen' from project 'Pods') (1 failure)

Version

1.12.1

What platforms are you seeing this issue on?

System Information

info Fetching system and libraries information...
System:
    OS: macOS 14.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 15.40 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.1/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.1/bin/npm
    Watchman: 2023.07.03.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
    Android SDK:
      API Levels: 29, 31, 33, 34
      Build Tools: 29.0.2, 30.0.3, 33.0.0, 33.0.1, 34.0.0
      System Images: android-21 | Google APIs ARM 64 v8a, android-23 | ARM 64 v8a, android-33 | Google APIs ARM 64 v8a, android-33 | Google APIs Intel x86_64 Atom, android-33 | Google Play ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
  Languages:
    Java: 20.0.1 - /Users/dcorbin/.jenv/shims/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.16 => 0.71.16 
    react-native-macos: ^0.71.0-0 => 0.71.36 
  npmGlobalPackages:
    *react-native*: Not Found

Steps to Reproduce

npx react-native@latest init KitPrintCoordinator --template "react-native@^0.71.0" cd KitPrintCoordinator npx react-native-macos-init cd macos; pod install; cd .. yarn run macos

At this point, the app works.

yarn add @react-native-community/async-storage cd macos; pod install; cd .. yarn run macos

Now I get the error.

raphpay commented 4 months ago

Same here

wise-danya commented 4 months ago

The same.

UPD: full nuke helped me. /thread

rm -rf macos/Pods
rm -rf macos/Podfile.lock
rm -rf macos/build
rm -rf node_modules

yarn start --reset-cache
yarn && npx pod-install macos && npx react-native run-macos
tido64 commented 4 months ago

@dcorbin: Try using @react-native-async-storage/async-storage instead of @react-native-community/async-storage. The latter has been deprecated for three years or so now. Once you have the right package installed, I would also suggest do a nuke like @wise-danya suggested.

dcorbin commented 4 months ago

Then the github README should reflect that.

github-actions[bot] commented 2 months ago

This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed.