Grunt dependency conflicts in Bootstrap

I downloaded the Bootstrap source files from the official site and I get dependency conflicts when installing the project using node npm . I have grunt 0.4.3 installed on my machine, but some dependencies require bootstrap 0.4.0 and some 0.4.1 .

The npm install -g grunt-cli completed without problems. Here's the log I get after running the npm install command:

 npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer grunt-banner@0.2.1 wants grunt@~0.4.1 npm ERR! peerinvalid Peer grunt-contrib-clean@0.5.0 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-concat@0.3.0 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-connect@0.6.0 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-copy@0.5.0 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-csslint@0.2.0 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-cssmin@0.7.0 wants grunt@~0.4.1 npm ERR! peerinvalid Peer grunt-contrib-jade@0.9.1 wants grunt@~0.4.1 npm ERR! peerinvalid Peer grunt-contrib-jshint@0.8.0 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-less@0.9.0 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-qunit@0.4.0 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-uglify@0.3.3 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-contrib-watch@0.5.3 wants grunt@~0.4.0 npm ERR! peerinvalid Peer grunt-csscomb@2.0.1 wants grunt@~0.4.2 npm ERR! peerinvalid Peer grunt-exec@0.4.3 wants grunt@~0.4 npm ERR! peerinvalid Peer grunt-html-validation@0.1.13 wants grunt@~0.4.1 npm ERR! peerinvalid Peer grunt-jekyll@0.4.1 wants grunt@~0.4.1 npm ERR! peerinvalid Peer grunt-jscs-checker@0.3.2 wants grunt@0.4.2 npm ERR! peerinvalid Peer grunt-saucelabs@5.0.1 wants grunt@~0.4.1 npm ERR! peerinvalid Peer grunt-sed@0.1.1 wants grunt@~0.4 npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! cwd C:\Users\\Desktop\bootstrap-3.1.1 npm ERR! node -v v0.10.15 npm ERR! npm -v 1.3.5 npm ERR! code EPEERINVALID npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\Users\\Desktop\bootstrap-3.1.1\npm-debug.log npm ERR! not ok code 0 

I follow these installation steps.

How can I install this project without errors?

+48
npm twitter-bootstrap gruntjs
Mar 08 '14 at 12:07
source share
6 answers

I ran into this problem this morning. I ended up changing line 30 in the Bootstrap package.json file: from "~ 0.4.2" to "0.4.2":

 27 "devDependencies": { ... 30 "grunt" : "0.4.2" 

This means that 0.4.3 no longer meets the dependency specification, but also means that you will not install new versions of grunt later. This is enough to make everything work, but you should probably change it in the end (maybe in the next bootstrap project leave it alone).

+61
Mar 08 '14 at 17:51
source share

I ran into the same problem. Do the following:

 bower install bootstrap cd bower_components/bootstrap npm install 

Result:

 npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements! 

I solved this by first removing grunt from the bootstrap directory

 npm uninstall grunt 

Then I installed grunt 0.4.2

 npm install grunt@0.4.2 

This time npm install worked just fine

 npm install 
+11
Mar 13 '14 at 13:49
source share

this problem is peerDependencies for grunt
If you want to know this problem, go to this URL
http://blog.nodejs.org/2013/02/07/peer-dependencies/

this solution to solve this problem
step1: you open package.json in the root directory
step2: find the line "grunt": "~ 0.4.2"
step3: Change to "grunt": "0.4.2"
step4: $ npm install

+5
Mar 26 '14 at 7:40
source share

You may have Grunt 0.4.3 installed globally, but nothing installed locally.

  • Run $ grunt --version to find the version you are in (not a necessary step).
  • Create the package.json file in the root of the folder on which you want to include your project.

     { "name" : "MyProject", "version" : "0.1.0", "author" : "My name", "private" : true, "devDependencies" : { "grunt" : "~0.4.2" } } 
  • Run $ npm install in the project root folder.

Done!

--- UPDATE ---

You can use Bower to install Bootstrap for you. This makes bulky installations easy. Bootstrap Getting Started Guide advises using it!

 $ bower install bootstrap 

Here is a blog post that may be relevant to you: Using Grunt + Bower with Laravel and Bootstrap

Or you can always let Grunt manage the Bootstrap installation and maintain it as a dependency ... There are several plugins that do the hard work.

0
Mar 08 '14 at 1:07
source share

I also had this problem.

I installed bootstrap using git clone https://github.com/twbs/bootstrap.git and it worked perfectly with this resulting boot directory.

0
Jun 12 '14 at 6:48
source share

Try npm cache clean , and then try the install command again.

0
Apr 27 '16 at 11:05
source share



All Articles