react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Option 'customConditions' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'

Open therealkh opened this issue 1 year ago • 5 comments

Description

I upgraded my project to 0.75.3. I know that newer version of react native upgrades typescript as well. I will provide our tsconfig.json below. This configuration was working perfectly on 0.72 version. I wonder what should be changed there

tsconfig.json:

{
  "compilerOptions": {
    "target": "esnext",
    "module": "commonjs",
    "lib": ["es2017", "ES2021.String"],
    "allowJs": true,
    "jsx": "react-native",
    "noEmit": true,
    "isolatedModules": true,
    "strict": true,
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "baseUrl": "./",
    "paths": {
      "~/*": ["src/*"]
    }
  },
  "include": ["src/**/*", "App.tsx"],
  "extends": "@react-native/typescript-config/tsconfig.json"
}

Steps to reproduce

unfortunately project is private and I cannot provide repo(

React Native Version

0.75.3

Affected Platforms

Other (please specify)

Output of npx react-native info

System:
  OS: macOS 15.0
  CPU: (8) arm64 Apple M1 Pro
  Memory: 78.27 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.1.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v18.16.0/bin/yarn
  npm:
    version: 10.2.0
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2023.11.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.13.0
    path: /Users/uktam/.rvm/gems/ruby-2.7.8/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK:
    Android NDK: 22.1.7171670
IDEs:
  Android Studio: 2024.1 AI-241.19072.14.2412.12360217
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 2.7.8
    path: /Users/uktam/.rvm/rubies/ruby-2.7.8/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 14.1.1
    wanted: ^14.1.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.3
    wanted: 0.75.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

there is no stacktrace logs

Reproducer

Screenshots and Videos

No response

therealkh avatar Oct 23 '24 10:10 therealkh

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

react-native-bot avatar Oct 23 '24 10:10 react-native-bot

:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.75.4. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

react-native-bot avatar Oct 23 '24 10:10 react-native-bot

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:

react-native-bot avatar Oct 23 '24 10:10 react-native-bot

:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

react-native-bot avatar Oct 23 '24 10:10 react-native-bot

@therealkh We need a valid reproducer to check this at our end. Also mention any stacktrace or logs related to issue you are using. You can use this reproducer.

shubhamguptadream11 avatar Oct 23 '24 16:10 shubhamguptadream11

@therealkh To assist effectively, please provide a valid reproducer for the issue so we can replicate it on our end. Make sure to include any relevant stack traces, logs, or error messages you’re encountering, as these will help us understand the problem in greater detail. Additionally, if there are any specific configurations or environment details involved (e.g., OS version, dependencies, or frameworks), please share those as well. You can use this reproducer to guide your setup.

UnicodeTech-PVT avatar Nov 01 '24 14:11 UnicodeTech-PVT

Faced the same issue and updated moduleResolution: Node to moduleResolution: bundler in tsconfig.json.

ja-ka avatar Nov 09 '24 16:11 ja-ka

Faced the same issue and updated moduleResolution: Node to moduleResolution: bundler in tsconfig.json.

Worked but now I'm getting:

Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later

GSFZamai avatar Nov 19 '24 12:11 GSFZamai

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Dec 14 '24 05:12 react-native-bot

This issue was closed because it has been stalled for 7 days with no activity.

react-native-bot avatar Dec 21 '24 05:12 react-native-bot

I'm getting this as we speak...

dprevost-LMI avatar Feb 10 '25 16:02 dprevost-LMI

Same here.

rrishavj avatar Jun 02 '25 17:06 rrishavj

Same here. Updated react-native from 0.76.9 to 0.79.3.

Reykjavik151 avatar Jun 10 '25 11:06 Reykjavik151

Same here. I updated the Expo SDK from 52 to 53 which includes an update from react-native to 0.79

LeipzigerLui avatar Jun 11 '25 06:06 LeipzigerLui

FYI: I had it fixed. If I recall correctly, it was related to my tsoncfig.ts. Before, I was not extending @react-native/typescript-config/tsconfig.json and had multiple customizations, now it is down to:

{
  "extends": "@react-native/typescript-config/tsconfig.json",
  "compilerOptions": {
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "downlevelIteration": true,
  }
}

Note: That was when I upgraded to 76, I see reports for 79, maybe something different now!

dprevost-LMI avatar Jun 11 '25 11:06 dprevost-LMI