react-native
react-native copied to clipboard
TypeError: Cannot create property 'lastUpdateCheck' on string 'lastUpdateCheck 1713956001921 nodeLinker node-modules ces nodeLinker node-modules'
Description
Got TypeError while creating app with latest version.
Steps to reproduce
- 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
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
Pleasae provide a valid repro @kuldipopenxcell
I ran into the same issue. Here's what happened on my end and how I fixed it locally.
- Delete ~/.yarnrc
- Ran
npx react-native@latest init MyProject
- It fails with the error above.
- There appears to be a rogue "ces" string in the generated ~/.yarnrc
- I removed the "ces"
- Re-ran
npx react-native@latest init MyProject
and it completed successfully
@francisace works fine for me. Thanks
- Open your terminal and enter
nano ~/.yarnrc
to open the file. - Remove
"ces"
using the arrow keys. - Press
Ctrl+X
to exit, then pressY
to confirm the changes and hit Enter.
I confirm I had this issue ... why everytime I create a new project I have a new error. react-native is so surprising.
- Open your terminal and enter
nano ~/.yarnrc
to open the file.- Remove
"ces"
using the arrow keys.- Press
Ctrl+X
to exit, then pressY
to confirm the changes and hit Enter.
Thank you, this method works for me
- Open your terminal and enter
nano ~/.yarnrc
to open the file.- Remove
"ces"
using the arrow keys.- Press
Ctrl+X
to exit, then pressY
to confirm the changes and hit Enter.
Thanks @virenradadiya It works for me
- Open your terminal and enter
nano ~/.yarnrc
to open the file.- Remove
"ces"
using the arrow keys.- Press
Ctrl+X
to exit, then pressY
to confirm the changes and hit Enter.
Thank you @virenradadiya
- Open your terminal and enter nano ~/.yarnrc to open the file.
- Remove "ces" using the arrow keys.
- Press Ctrl+X to exit, then press Y to confirm the changes and hit Enter.
Thank you @virenradadiya