Search code examples
javascriptgitthree.jsbowerbower-install

Unable to download three.js file using bower


I.m getting an error when I try to download three.js file by specifying the version in bower.json file.

 "dependencies": {
                 "three.js":"~0.0.69"
                }

Error :No versions found in git://github.com/jiyinyiyong/three.js.git

Instead ,I'm downloading the whole repo by specifying the url like this:

  "dependencies": {
                      "three.js":"https://github.com/mrdoob/three.js.git"
                    }

which is taking time and space. How can I download only the file from the git repo.?


Solution

  • Get rid of the period in three.js, i.e.

    "dependencies": {
      "threejs": "r70"
    }
    

    This points to the official ThreeJS repository.

    If you wish to only have the minified library file (much smaller download), use:

    "dependencies": {
      "threejs": "https://raw.githubusercontent.com/mrdoob/three.js/master/build/three.min.js"
    }