th3rdwave / react-native-safe-area-context

A flexible way to handle safe area insets in JS. Also works on Android and Web!
MIT License
2.14k stars 197 forks source link

Filename longer than 260 characters Error on React Native Fabric #424

Open alexhernandez opened 1 year ago

alexhernandez commented 1 year ago

Hi 👋, I've been getting the following error on android only when building a react native app with Hermes and Fabric enabled. Not sure if this a known issue or if anyone knows a solution for this.

My Issue:

ninja: error: Stat(safeareacontext_autolinked_build/CMakeFiles/react_codegen_safeareacontext.dir/E_/Workspace/Build.Android.qaRelease/node_modules/react-native-safe-area-context/android/build/generated/source/codegen/jni/react/renderer/components/safeareacontext/safeareacontextJSI-generated.cpp.o): Filename longer than 260 characters

My System info:

info Fetching system and libraries information...
System:
  OS: macOS 13.5.1
  CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Memory: 23.95 GB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.16.1
    path: ~/.nvm/versions/node/v18.16.1/bin/node
  Yarn:
    version: 1.18.0
    path: ~/.yarn/bin/yarn
  npm:
    version: 9.5.1
    path: ~/.nvm/versions/node/v18.16.1/bin/npm
  Watchman:
    version: 2023.08.07.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /Users/alehernandez/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10406996
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.20
    path: /usr/bin/javac
  Ruby:
    version: 3.1.4
    path: /Users/alehernandez/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
sebasg0 commented 1 year ago

I have same issue

sebasg0 commented 1 year ago

trying to find a fix, I will notify u if I find one and please also lmk if u are able to fix it

sebasg0 commented 1 year ago

Just reduce the path, I placed the directory in the root and it worked. Then after that you will face another issue with a missing file, for that you will have to use ndkVersion = "25.2.9519653"

alexhernandez commented 1 year ago

I placed the directory in the root and it worked.

Which directory? Do you have a code example?

Piyush-K108 commented 10 months ago

have you got the answer i am still stuck same error

shikharthakur2404 commented 8 months ago

us bro us. im trying with changing versions

whysetiawan commented 3 months ago

Unfortunately it's windows issue. Workaround