Open alecpo opened 4 years ago
npm install -g react-native-cli
npx react-native init Test --template rocketseat-advanced
npm install -g react-native-cli
npx react-native init Test --template rocketseat-advanced
They does not recommend install globally anymore. It is something to improvement in the template apparently.
https://reactnative.dev/docs/environment-setup
React Native Command Line Interface React Native has a built-in command line interface. Rather than install and manage a specific version of the CLI globally, we recommend you access the current version at runtime using npx, which ships with Node.js. With npx react-native
, the current stable version of the CLI will be downloaded and executed at the time the command is run.
Encontrei esse erro ao tentar utilizar o template de vocês, olha só
O que pode ser? Faltou o package-lock.json ou o yarn.lock no repo?
You can clone the project.
and run the command template this way:
npx react-native init MyApp --template file:///Users/ricardo/Developer/react-native/react-native-template-rocketseat-advanced
I figure out that an improvement needs to be done at this repository, it isn't following the current pattern to publish React Native template. So I decided to built one by myself, you can find my template here: https://www.npmjs.com/package/react-native-template-alecpo and then the command npx react-native init ProjectName --template react-native-template-alecpo will work. Anyone can try and help to improve it :)
@alecpo Where did you found the docs? I saw something like this with tem react-native-template-typescript, but it is still strange, since devDependencies and dependencies are removed from project, this is right?
@alecpo Where did you found the docs? I saw something like this with tem react-native-template-typescript, but it is still strange, since devDependencies and dependencies are removed from project, this is right?
Yes it's right. The model for creating new models has apparently changed.
I looked for the documentation, but I didn't find it. So, what I did was look at react-native-template-typescript and another model published by a member of the rocketseat community on Discord. And then I tried to change my files until it worked. And it worked.
you know what? may 14 at 1 am, I've trying create one project by react native,, got this error, and check it, and I was realized that its yesterday the problem has got follow up. But, @alecpo ,, thanks for the link that you share. I'll try it. Have a good time, and hopely the case has resolve sometime.
Encontrei esse erro ao tentar utilizar o template de vocês, olha só
O que pode ser? Faltou o package-lock.json ou o yarn.lock no repo?