We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
npx react-native init AwesomeProject
$ npx react-native info [6:18:28] info Fetching system and libraries information... System: OS: macOS 13.2.1 CPU: (10) arm64 Apple M1 Pro Memory: 114.38 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.15.0 - ~/.volta/tools/image/node/18.15.0/bin/node Yarn: 3.5.0 - ~/.volta/tools/image/yarn/3.5.0/bin/yarn npm: 9.5.0 - ~/.volta/tools/image/node/18.15.0/bin/npm Watchman: 2023.04.24.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: Not Found SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.9862592 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: javac 20 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found
I'm unable to generate a new project using npx react-native init AwesomeProject.
After running the command I get the following error complaining about templates.
✔ Downloading template ✖ Copying template error Error: Couldn't find the "/var/folders/fh/lhl7dk512g91vhcm4dw5lqjh0000gn/T/rncli-init-template-l54HLn/node_modules/react-native/template.config.js file inside "react-native" template. Please make sure the template is valid. Read more: https://github.com/react-native-community/cli/blob/master/docs/init.md#creating-custom-template. Error: Error: Couldn't find the "/var/folders/fh/lhl7dk512g91vhcm4dw5lqjh0000gn/T/rncli-init-template-l54HLn/node_modules/react-native/template.config.js file inside "react-native" template. Please make sure the template is valid. Read more: https://github.com/react-native-community/cli/blob/master/docs/init.md#creating-custom-template at createFromTemplate (/Users/loi/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/commands/init/init.js:131:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.initialize [as func] (/Users/loi/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3) at async Command.handleAction (/Users/loi/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/index.js:106:9)
There isn't code to share becasue the command only creates a direct named MyAwesomeProject and then immediately exits on encountering that failure.
MyAwesomeProject
Please advise. TIA~!
The text was updated successfully, but these errors were encountered:
Hello @PrimeTimeTran! Could you please try to create project with this command npx react-native@latest init MyAwesomeProject?
npx react-native@latest init MyAwesomeProject
Sorry, something went wrong.
Thanks @szymonrybczak!
I did and it failed with that one as well.
I just remembered that sometimes npm and yarn conflict.
npm
yarn
When running the command npx react-native@latest init AwesomeProject --npm it now works!
npx react-native@latest init AwesomeProject --npm
I can confirm this issue is only present with newer versions of yarn. @szymonrybczak in order to reproduce this, you can follow https://yarnpkg.com/getting-started/install and install yarn 3.5.0.
3.5.0
npx @react-native-community/cli@latest init AwesomeProject
this worked for me, i have npm and yarn both installed
No branches or pull requests
Environment
Description
I'm unable to generate a new project using
npx react-native init AwesomeProject
.After running the command I get the following error complaining about templates.
Reproducible Demo
There isn't code to share becasue the command only creates a direct named
MyAwesomeProject
and then immediately exits on encountering that failure.Please advise. TIA~!
The text was updated successfully, but these errors were encountered: