zoontek / react-native-permissions

An unified permissions API for React Native on iOS, Android and Windows.
MIT License
4.1k stars 836 forks source link

"Project 'react-native-permissions' not found" + "ignored because it contains invalid configuration" #793

Closed jesuscc1993 closed 1 year ago

jesuscc1993 commented 1 year ago

Bug summary

I'm trying to upgrade from 2.1.5 to >= 3.6.0 in order to bring in the new Android 13 permissions. However, every version I tried so far throws the following two errors:

Project 'react-native-permissions' not found in root project when building the app from Android Studio.

Package react-native-permissions has been ignored because it contains invalid configuration. Reason: Cannot find module 'fs/promises' when starting the react native app.

The library works once more if I go back to 2.1.5, and it seems to work on 3.5.0 too. But it wasn't until 3.6.0 that the remaining missing Android's 13 permissions were added.

Library version

3.6.0 - 3.8.4

Environment info

System:
    OS: macOS 13.4.1
    CPU: (8) x64 Apple M1 Pro
    Memory: 16.72 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 12.22.12 - /var/folders/2_/_4ngbvyj55s3yc47kp_57wx80000gn/T/yarn--1691140122017-0.4301483916679747/node
    Yarn: 1.22.18 - /var/folders/2_/_4ngbvyj55s3yc47kp_57wx80000gn/T/yarn--1691140122017-0.4301483916679747/yarn
    npm: 6.14.16 - ~/.nvm/versions/node/v12.22.12/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.2 - /Users/Txus/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 28, 30, 31, 32, 33
      Build Tools: 28.0.3, 30.0.2, 32.0.0, 32.1.0, 33.0.0, 33.0.1, 34.0.0
      System Images: android-29 | Google Play ARM 64 v8a, android-32 | Google Play ARM 64 v8a, android-33 | Google Play ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2022.3 AI-223.8836.35.2231.10406996
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_332 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.0 => 0.64.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Try to build on android studio or to start react native after upgrading the library.

Reproducible sample code

"react-native-permissions": "^3.6.0",
zoontek commented 1 year ago

Update Node to at least 18, Node 12 is super deprecated and unsupported now.

https://endoflife.date/nodejs

zoontek commented 1 year ago

FYI: https://nodejs.org/api/fs.html

IMG_9761