Cli: --template is not working

Created on 9 Dec 2020  路  6Comments  路  Source: react-native-community/cli

Environment


Not relevant at this point

Description

Using npx react-native init MyApp --template typescript (I guess any template actually) is not working.

It seems that a step is missing like "apply the template"

We can see in the folder after init process finish that a ./template folder is here, containing what we would expect to be at root ./

Reproducible Demo

npx react-native init MyApp --template typescript

Screen Shot 2020-12-09 at 1 36 29 PM

bug report

All 6 comments

By the way, I was creating a new project with the will to create a template myself. Maybe the process has changed?

I found this article from 2017, that doesn't seem up to date when comparing what lives in the typescript template.

If you have any advises at same the time really interested :)

CLI doesn't supports shortcuts anymore, but full module names or absolute file paths. Check the docs/ directory in this repository :)

npx react-native init MyApp --template react-native-template-typescript

Okay thanks will check that

@thymikee Doesn't seems to be better, I don't know if it a display error, but it seems to try to fetch react-native-template-react-native-template-typescript

Screen Shot 2020-12-10 at 9 05 59 AM

Package.json doesn't even have the right dependencies

Screen Shot 2020-12-10 at 9 09 30 AM

@thymikee Sorry for the noise, all good, it came from the fact that I still had a react-native-cli installed locally and it was using it instead of the right cli :)

@thymikee Sorry for the noise, all good, it came from the fact that I still had a react-native-cli installed locally and it was using it instead of the right cli :)

Happens to the best :) Glad it works for you now!

Was this page helpful?
0 / 5 - 0 ratings