question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breaks with @react-native-community/cli@2.0.0-rc.2

See original GitHub issue

Expected results

The project should initialise properly.

Observed results

Can’t be built because of the new template api documented here

Logs

image

✔ Downloading template
✖ Copying template
error Error: Cannot find module '/var/folders/78/49srzccj41jg4k660nnt6b8w0000gn/T/rncli-init-template-1UgDus/node_modules/react-native-template-typescript/template.config'

Steps to reproduce

  1. Install the latest version of the cli
yarn global add @react-native-community/cli@2.0.0-rc.2 
# Or 
npm i -g @react-native-community/cli@2.0.0-rc.2
  1. Create the app
react-native init YoYoYo --version react-native@next --template typescript
  1. Observe the failure

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

21reactions
emin93commented, Jul 10, 2019

You can now use the new CLI to create a project 🎉 : npx react-native init MyApp --template react-native-template-typescript@next

3reactions
emin93commented, Jun 13, 2019

Thanks for creating the issue and raising awareness about the new CLI changes. Luckily it seems like it can be fixed easily by creating a template config file and changing the folder structure. As this will break the process in the current CLI, I’ll do that in a separate branch and release a pre-release version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@react-native-community/cli - npm
Start using @react-native-community/cli in your project by running `npm i ... 2. a month ago. 10.0.0-alpha.0. 1. 2 months ago ... 2.0.0-rc.2.
Read more >
Upgrading to new versions - React Native
There's currently two ways for upgrading your React Native project: by using React Native CLI or manually with Upgrade Helper.
Read more >
React Native Community (@ReactNativeComm) / Twitter
It's a new command to troubleshoot and fix errors in your environment so you can spend ... react-native-device-info 3.0.0-rc.2 is out - any...
Read more >
Trouble getting Expo React Native environment setup
My environment is setup with the following: Windows: 11; NVM: 1.1.9; Nodejs: 16.13.2; NPM: 8.4.0; expo-cli: 5.0.
Read more >
@react-native-community/cli-tools | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found