[0.74] npx react-native init 应该警告用户,但目前还没有

uqxowvwt  于 3个月前  发布在  React
关注(0)|答案(2)|浏览(73)

描述

根据RFC0759:

0.74版本的用户在运行npx react-native init时应该开始看到警告。
这个功能已经在以下平台上实现:

看起来这个警告实际上没有正常工作。

重现步骤

  1. 运行npx react-native@latest init RN074 --skip-install
  2. 观察到警告没有发出

React Native版本

0.74.0

受影响的平台

构建 - MacOS,构建 - Windows,构建 - Linux

npx react-native info的输出

Not relevant.

堆栈跟踪或日志

Here the output of the log:

$ npx react-native@latest init RN074 --skip-install

               ######                ######
             ###     ####        ####     ###
            ##          ###    ###          ##
            ##             ####             ##
            ##             ####             ##
            ##           ##    ##           ##
            ##         ###      ###         ##
             ##  ########################  ##
          ######    ###            ###    ######
      ###     ##    ##              ##    ##     ###
   ###         ## ###      ####      ### ##         ###
  ##           ####      ########      ####           ##
 ##             ###     ##########     ###             ##
  ##           ####      ########      ####           ##
   ###         ## ###      ####      ### ##         ###
      ###     ##    ##              ##    ##     ###
          ######    ###            ###    ######
             ##  ########################  ##
            ##         ###      ###         ##
            ##           ##    ##           ##
            ##             ####             ##
            ##             ####             ##
            ##          ###    ###          ##
             ###     ####        ####     ###
               ######                ######

                  Welcome to React Native!
                 Learn once, write anywhere

✔ Downloading template
✔ Copying template
Resolving 1.22.22 to a url...
error https://api.github.com/repos/yarnpkg/yarn/releases: API rate limit exceeded for 163.114.131.66. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
yarn config v1.22.22
success Set "nodeLinker" to "node-modules".
✨  Done in 0.02s.
✔ Processing template
✔ Dependencies installation skipped

info 💡 To enable automatic CocoaPods installation when building for iOS you can create react-native.config.js with automaticPodsInstallation field.
For more details, see https://github.com/react-native-community/cli/blob/main/docs/projects.md#projectiosautomaticpodsinstallation

✔ Initializing Git repository

  Run instructions for Android:
    • Have an Android emulator running (quickest way to get started), or a device connected.
    • cd "/private/tmp/RN074" && npx react-native run-android

  Run instructions for iOS:
    • cd "/private/tmp/RN074/ios"

    • Install Cocoapods
      • bundle install # you need to run this only once in your project.
      • bundle exec pod install
      • cd ..

    • npx react-native run-ios
    - or -
    • Open RN074/ios/RN074.xcodeproj in Xcode or run "xed -b ios"
    • Hit the Run button

  Run instructions for macOS:
    • See https://aka.ms/ReactNativeGuideMacOS for the latest up-to-date instructions.
### Reproducer

N/A

### Screenshots and Videos

N/A

相关问题