cli icon indicating copy to clipboard operation
cli copied to clipboard

Fail to download yarn if there is expired GITHUB_TOKEN

Open pnthach95 opened this issue 1 year ago • 2 comments

Environment

System:
  OS: macOS 14.4.1
  CPU: (8) arm64 Apple M1
  Memory: 74.72 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.12.1
    path: ~/.nvm/versions/node/v20.12.1/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.12.1/bin/yarn
  npm:
    version: 10.5.1
    path: ~/.nvm/versions/node/v20.12.1/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/pnthach/.rvm/rubies/ruby-2.7.5/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK:
    API Levels:
      - "28"
      - "30"
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 28.0.3
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
    System Images:
      - android-30 | Google APIs ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11567975
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/pnthach/.rvm/rubies/ruby-2.7.5/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: Not found
  newArchEnabled: false

Description

I try to create new 0.74 project. It shows an error: error request.filter is not a function.

Screenshot 2024-04-24 at 2 32 04 PM

After read https://github.com/yarnpkg/yarn/issues/7847, I removed GITHUB_TOKEN from .zshrc file and it can download yarn

Screenshot 2024-04-24 at 2 27 54 PM

Reproducible Demo

  1. Add export GITHUB_TOKEN="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" (feel free to use because it's expired) to .zshrc or .bashrc if you use bash
  2. Run npx react-native init rn74 and see error

pnthach95 avatar Apr 24 '24 07:04 pnthach95

hey, actually init command should use Yarn v3 right now for new projects, could you please try running with @latest tag, so npx react-native@latest init asdf because when you don't add this tag it uses cached version of CLI.

szymonrybczak avatar Apr 24 '24 19:04 szymonrybczak

@latest tag doesn't install yarn v3 for me. I have installed yarn v1.22.22 with npm i yarn -g

https://github.com/react-native-community/cli/assets/31266357/70e4a856-bf56-479e-996c-5b863c4a51bd

And upgrade helper shows yarn v1, not yarn v3

image

pnthach95 avatar Apr 25 '24 02:04 pnthach95

hey @pnthach95, did you resolve your issue?

And upgrade helper shows yarn v1, not yarn v3

ah, sorry it was issue with upgrade helper. we've fixed it and when you look at upgrade helper's diff now it shows Yarn v3 with proper messaging.

szymonrybczak avatar May 06 '24 11:05 szymonrybczak

Screenshot 2024-05-07 at 8 45 38 AM

Fixed in 0.74.1

pnthach95 avatar May 07 '24 01:05 pnthach95