0

I have looked through various answers but cannot seem to determine a solution to my specific issue. I installed node.js on my macbook air (10.7.5). I installed bower. All successful. Then when I try to install bootstrap, I get the following error.

$ bower install -g bootstrap

bower not-cached    git://github.com/twbs/bootstrap.git#*

bower resolve       git://github.com/twbs/bootstrap.git#*

bower ENORESTARGET  Tag/branch master does not exist

Additional error details:

No tags found in git://github.com/twbs/bootstrap.git

No branches found in git://github.com/twbs/bootstrap.git


# The following command works:

$ which git

/usr/local/bin/git


# I tried this (some suggestion from another post):

$ git clone https://github.com/git/git

Illegal instruction: 4

Any help is much appreciated. Thanks

Haroen Viaene
  • 1,329
  • 18
  • 33

1 Answers1

0

Usually you install bower inside the directory of your project. You start by installing bower (which you've already done). Then you initialise it in your project by using bower init. This will look something like:

$ bower init
? name test
? description bla bla some 
? main file 
? what types of modules does this package expose? 
? keywords 
? authors Haroen Viaene <hello@haroen.me>
? license MIT
? would you like to mark this package as private which prevents it from being accidentally published to the registry? (y/N) y
{
  name: 'test',y? (y/N) 
  authors: [
    'Haroen Viaene <hello@haroen.me>'
  ],
  description: 'bla bla some',
  main: '',
  moduleType: [],
  license: 'MIT',
  homepage: '',
  ignore: [
    '**/.*',
    'node_modules',
    'bower_components',
    'test',
    'tests'
  ]
}

? Looks good? Yes

Then you can install bootstrap by doing bower install --save bootstrap. This should look like:

$ bower install --save bootstrap
bower cached        git://github.com/twbs/bootstrap.git#3.3.6
bower validate      3.3.6 against git://github.com/twbs/bootstrap.git#*
bower cached        git://github.com/jquery/jquery-dist.git#2.2.2
bower validate      2.2.2 against git://github.com/jquery/jquery-dist.git#1.9.1 - 2
bower install       bootstrap#3.3.6
bower install       jquery#2.2.2

bootstrap#3.3.6 bower_components/bootstrap
└── jquery#2.2.2

jquery#2.2.2 bower_components/jquery

Now bootstrap should be installed in your bower_components folder.

Haroen Viaene
  • 1,329
  • 18
  • 33
  • Thanks but I had installed bower in the directory of my project and done bower init. All that went well. Then I tried to install bootstrap with bower and I got enogit. So I installed git and retried and got the above error. Then looking at another post, I uninstalled bower (since it had been installed before git). Then I reinstalled bower and did bower init. Then again tried bootstrap install but still got same message. – Divya Bhasin Apr 05 '16 at 09:49
  • Did you try this? http://stackoverflow.com/q/24234063/3185307 (removing the contents of `.git/`, `.gitignore` and `.gitattributes` – Haroen Viaene Apr 06 '16 at 08:36