Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alecpo opened this issue May 12, 2020 · 7 comments
Open

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

alecpo opened this issue May 12, 2020 · 7 comments

Comments

@alecpo
Copy link

alecpo commented May 12, 2020

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
Copy link

hugosbg commented May 16, 2020

  1. npm install -g react-native-cli

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

@ricardosbarbosa
Copy link

  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
Copy link

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
Copy link
Author

alecpo commented May 26, 2020

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
Copy link

@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
Copy link
Author

alecpo commented May 26, 2020

@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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants