ignite icon indicating copy to clipboard operation
ignite copied to clipboard

[Maverick] Missing .gitignore?

Open juddey opened this issue 2 years ago • 9 comments

Describe the bug

When running ignite-new PizzaApp and choosing to create git repoisitory, theres no .gitignore present in the created directories.

this means everything is committed to source control, including node_modules....

Is this expected behaviour?

Screen Shot 2022-09-17 at 5 33 02 PM

Ignite version

8.0.0-beta-5

Additional info

As per #2170

juddey avatar Sep 17 '22 05:09 juddey

Hi @juddey thanks for reporting this issue! Can you please confirm that this is just an issue when using npm as the package manager? Also if you don't mind, paste the command that gets output in the terminal for the options you used:

image

frankcalise avatar Sep 17 '22 15:09 frankcalise

Hi Frank,

Here's what I'm running:

npx ignite-cli@next new DemoFrank

I select npm, and I noticed I also install deps:

Screen Shot 2022-09-19 at 10 39 46 AM

To eliminate the deps difference I created a repo and did not install deps:

Screen Shot 2022-09-19 at 10 43 27 AM

As for the question about the yarn package manager, I've found that I can't have yarn on my system and have ignite successfully create a new app. I think it gets confused about the node source, as yarn also installs a node reference of some kind... Heres a full thread of that discussion: https://infiniteredcommunity.slack.com/archives/C41PK1LAY/p1663233201191519

However, if you're able to install with yarn and still get a .gitignore then that's enough of an indicator that its restricted to npm 😄

juddey avatar Sep 18 '22 22:09 juddey

@juddey I can't seem to reproduce this, can you run npx ignite-cli@next doctor from the project directory for some extra info and paste it here?

frankcalise avatar Sep 19 '22 19:09 frankcalise

Sure!

Jocelyns-Mini:DemoFrank Justin$ npx ignite-cli@next doctor
System
  platform           darwin                                                
  arch               x64                                                   
  cpu                12 cores     Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz 
  directory          DemoFrank    /Users/Justin/projects/DemoFrank         

JavaScript (and globally-installed packages)
  node                           14.20.0      /usr/local/opt/node@14/bin/node 
  npm                            6.14.17      /usr/local/opt/node@14/bin/npm  
    chromedriver                 91.0.1                                       
    detox                        15.1.2                                       
    detox-cli                    17.4.3                                       
    ignite-cli                   2.2.2                                        
    ios-deploy                   1.9.4                                        
    npm                          8.19.1                                       
    puppeteer                    6.0.0                                        
    puppeteer-pdf                1.2.0                                        
    react-native-clean-project   4.0.1                                        
    react-native-cli             2.0.1                                        
  yarn                           -            not installed                   
  pnpm                           -            not installed                   
  expo                           46.0.10      managed                         

Ignite
  ignite-cli         8.0.0-beta.5   /Users/Justin/.npm/_npx/48400/bin/ignite                        
  ignite src         build          /Users/Justin/.npm/_npx/48400/lib/node_modules/ignite-cli/build 

Android
  java               -            not installed 
  android home       -            undefined     

iOS
  xcode              14.0       
  cocoapods          1.11.3       /Users/Justin/.gem/ruby/2.7.6/bin/pod 

If this doesn't help and you can't replicate easily then don't worry too much about it

Sometimes strange things happen in the world of computer voodoo 👍

juddey avatar Sep 19 '22 21:09 juddey

This just happened to me too. I think it's because we removed the .gitignore.template file for some reason. cc @joshuayoes.

jamonholmgren avatar Sep 20 '22 03:09 jamonholmgren

For context: https://github.com/infinitered/ignite/pull/1781

yulolimum avatar Sep 20 '22 03:09 yulolimum

I ran

yarn build
npm pack

Then unzipped the tarball and opened it up, it appears that .gitignore and .gitignore.template are getting copied into the tarball

Screen Shot 2022-09-20 at 11 01 12 AM

joshuayoes avatar Sep 20 '22 18:09 joshuayoes

However, I am getting the described behavior in the issue with

npx [email protected] new PizzaApp --bundle=com.pizzaapp --git --install-deps=false --packager=yarn --target-path=./PizzaApp --overwrite --debug

joshuayoes avatar Sep 20 '22 18:09 joshuayoes

Screen Shot 2022-09-20 at 11 11 42 AM

.gitignore.template is getting copied into the global package, so for some reason it's not getting copied after npx ignite-cli@next new

joshuayoes avatar Sep 20 '22 18:09 joshuayoes

@juddey 8.0.0-beta.7 is out now with a PR that should resolve this. Can you try again with npx ignite-cli@next new?

joshuayoes avatar Sep 21 '22 23:09 joshuayoes

I'm going to close this issue for now. But if you are still having issues with it on the latest version, feel free to re-open it

joshuayoes avatar Sep 21 '22 23:09 joshuayoes