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

TypeError: Cannot create property 'lastUpdateCheck' on string 'lastUpdateCheck 1713956001921 nodeLinker node-modules ces nodeLinker node-modules'

Open kuldipopenxcell opened this issue 10 months ago • 10 comments

Description

Got TypeError while creating app with latest version.

Steps to reproduce

  1. npx react-native@latest init MyProject

React Native Version

0.74.0

Affected Platforms

Runtime - Android, Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.3.1
  CPU: (8) arm64 Apple M2
  Memory: 82.64 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.12.1
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.5.0
    path: /usr/local/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11567975
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.0
    wanted: 0.74.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

TypeError: Cannot create property 'lastUpdateCheck' on string 'lastUpdateCheck 1713956001921 nodeLinker node-modules ces nodeLinker node-modules'
    at /Users/kuldip/Documents/RN-Projects/Chat-RN/FirebaseChat/.yarn/releases/yarn-1.22.22.cjs:100249:32
    at Generator.next (<anonymous>)
    at step (/Users/kuldip/Documents/RN-Projects/Chat-RN/FirebaseChat/.yarn/releases/yarn-1.22.22.cjs:310:30)
    at /Users/kuldip/Documents/RN-Projects/Chat-RN/FirebaseChat/.yarn/releases/yarn-1.22.22.cjs:328:14
    at new Promise (<anonymous>)
    at new F (/Users/kuldip/Documents/RN-Projects/Chat-RN/FirebaseChat/.yarn/releases/yarn-1.22.22.cjs:25832:28)
    at /Users/kuldip/Documents/RN-Projects/Chat-RN/FirebaseChat/.yarn/releases/yarn-1.22.22.cjs:307:12
    at YarnRegistry.saveHomeConfig (/Users/kuldip/Documents/RN-Projects/Chat-RN/FirebaseChat/.yarn/releases/yarn-1.22.22.cjs:100253:7)
    at /Users/kuldip/Documents/RN-Projects/Chat-RN/FirebaseChat/.yarn/releases/yarn-1.22.22.cjs:7440:38
    at Generator.next (<anonymous>)

Reproducer

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

Screenshots and Videos

No response

kuldipopenxcell avatar Apr 25 '24 06:04 kuldipopenxcell

: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.

github-actions[bot] avatar Apr 25 '24 06:04 github-actions[bot]

Pleasae provide a valid repro @kuldipopenxcell

cortinico avatar Apr 25 '24 12:04 cortinico

I ran into the same issue. Here's what happened on my end and how I fixed it locally.

  1. Delete ~/.yarnrc
  2. Ran npx react-native@latest init MyProject
  3. It fails with the error above.
  4. There appears to be a rogue "ces" string in the generated ~/.yarnrc
  5. I removed the "ces"
  6. Re-ran npx react-native@latest init MyProject and it completed successfully

francisace avatar Apr 25 '24 12:04 francisace

@francisace works fine for me. Thanks

kuldipopenxcell avatar Apr 26 '24 07:04 kuldipopenxcell

  1. Open your terminal and enter nano ~/.yarnrc to open the file.
  2. Remove "ces" using the arrow keys.
  3. Press Ctrl+X to exit, then press Y to confirm the changes and hit Enter.

virenradadiya avatar May 02 '24 09:05 virenradadiya

I confirm I had this issue ... why everytime I create a new project I have a new error. react-native is so surprising.

vricosti avatar May 03 '24 20:05 vricosti

  1. Open your terminal and enter nano ~/.yarnrc to open the file.
  2. Remove "ces" using the arrow keys.
  3. Press Ctrl+X to exit, then press Y to confirm the changes and hit Enter.

Thank you, this method works for me

urgenmagger avatar May 08 '24 16:05 urgenmagger

  1. Open your terminal and enter nano ~/.yarnrc to open the file.
  2. Remove "ces" using the arrow keys.
  3. Press Ctrl+X to exit, then press Y to confirm the changes and hit Enter.

Thanks @virenradadiya It works for me

SafiDS avatar Jun 14 '24 23:06 SafiDS

  1. Open your terminal and enter nano ~/.yarnrc to open the file.
  2. Remove "ces" using the arrow keys.
  3. Press Ctrl+X to exit, then press Y to confirm the changes and hit Enter.

Thank you @virenradadiya

Rasel-Dev avatar Aug 29 '24 14:08 Rasel-Dev

  1. Open your terminal and enter nano ~/.yarnrc to open the file.
  2. Remove "ces" using the arrow keys.
  3. Press Ctrl+X to exit, then press Y to confirm the changes and hit Enter.

Thank you @virenradadiya

Ivanov-Anton avatar Sep 13 '24 22:09 Ivanov-Anton