4

When I try to start a project with a typescript template and specific version,for example: 0.67.4 doesn´t install this version, but install the latest version 0.68.

enter image description here

System:
OS: Windows 10 10.0.19044
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Memory: 2.12 GB / 11.87 GB
Binaries:
Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - C:\Program Files\nodejs\yarn.CMD
npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD

1 Answer 1

6

The problem is that --template already uses a version, the one of the template, thus --version has no effect. You need to specify the correct typescript template version for the correct react-native version. For 0.67.X this is 6.9.* which is documented here.

Thus, the following should work.

npx react-native init RNCComponents --template react-native-template-typescript@6.9.6 

Do not ask me why it is 6.9.6 rather than 6.9.4, but this one was 0.67.2 rather than 0.67.4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.