Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CLI to use @react-native-community/cli init instead of react-native init #604

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

Yajur-Grover
Copy link
Contributor

Summary

When trying to build a vanilla library with a version of React Native 0.76 (e.g 0.76.0-nightly-20240701-9f6cb21ed), the script fails with the following error:

ℹ Using [email protected] for the example
⠹ Generating example app

⚠️ The `init` command is deprecated.

- Switch to npx @react-native-community/cli init for the identical behavior.
- Refer to the documentation for information about alternative tools: https://reactnative.dev/docs/getting-started
C:\new-account-repos\react-native-builder-bob\packages\create-react-native-library\lib\utils\spawn.js:27
        reject(new Error(stderr.trim()));

Allows creating a vanilla library with CRNL on 0.76 versions of react-native. This issue was hit in the RNW repo where we are trying to integrate 0.76.0-nightly-20240701-9f6cb21ed.

Test Plan

  1. Change the create-react-native-library.cmd line 3 to the following:
    node "%~dp0\create-react-native-library" %* --slug testcli --description testcli --author-name "React-Native-Windows Bot" --author-email [email protected] --author-url http://example.com/ --repo-url http://example.com/ --languages kotlin-objc --type module-new --react-native-version 0.76.0-nightly-20240701-9f6cb21ed --example vanilla testcli
  2. Run yarn watch
  3. Run packages/create-react-native-library/bin/create-react-native-library

@Yajur-Grover Yajur-Grover marked this pull request as ready for review July 30, 2024 23:14
@atlj atlj added this pull request to the merge queue Aug 1, 2024
Merged via the queue into callstack:main with commit 163b168 Aug 1, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants