Skip to content

Specifying --pm yarn and --skip-install together causes init failure #2743

@liamjones

Description

@liamjones

Environment

info Fetching system and libraries information...
System:
  OS: macOS 26.1
  CPU: (12) arm64 Apple M4 Pro
  Memory: 547.33 MB / 48.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.13.0
    path: /Users/liam.jones/.volta/tools/image/node/22.13.0/bin/node
  Yarn:
    version: 3.6.4
    path: /Users/liam.jones/.volta/tools/image/yarn/4.6.0/bin/yarn
  npm:
    version: 10.9.2
    path: /Users/liam.jones/.volta/tools/image/node/22.13.0/bin/npm
  Watchman:
    version: 2025.11.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.2 AI-252.27397.103.2522.14514259
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.29
    path: /Users/liam.jones/.sdkman/candidates/java/current/bin/javac
  Ruby:
    version: 2.6.10
    path: /Users/liam.jones/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.1.1
    wanted: 19.1.1
  react-native:
    installed: 0.82.1
    wanted: 0.82.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Description

If both options are specified the copying template step fails with:

⠋ Copying template

error Couldn't find the "/var/folders/pk/c4s_t539735dtyzm2yw9y39h0000gn/T/rncli-init-template-y1HtTj/node_modules/@react-native-community/template/template.config.js file inside "@react-native-community/template" template. Please make sure the template is valid. Read more: https://github.com/react-native-community/cli/blob/main/docs/init.md#creating-custom-template

If --pm is specified as bun or npm then it works fine.

Reproducible Demo

npx @react-native-community/cli@latest init RN0821Test3 --skip-install --pm yarn

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions