Rocketseat / react-native-template-rocketseat-advanced

Template avançada para aplicações React Native com a estrutura utilizada na Rocketseat 🚀
MIT License
504 stars 150 forks source link

Error: Command failed: yarn add rocketseat-advanced #12

Open alecpo opened 4 years ago

alecpo commented 4 years ago

Encontrei esse erro ao tentar utilizar o template de vocês, olha só

Captura de Tela 2020-05-12 às 19 07 21

O que pode ser? Faltou o package-lock.json ou o yarn.lock no repo?

hugosbg commented 4 years ago
  1. npm install -g react-native-cli

  2. npx react-native init Test --template rocketseat-advanced

ricardosbarbosa commented 4 years ago
  1. npm install -g react-native-cli
  2. 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.

ricardosbarbosa commented 4 years ago

Encontrei esse erro ao tentar utilizar o template de vocês, olha só

Captura de Tela 2020-05-12 às 19 07 21

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

alecpo commented 4 years ago

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 :)

lipeavelar commented 4 years ago

@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 commented 4 years ago

@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.

jusondac commented 3 years ago

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.