Having issues with downloading the three.js file through bower

I keep encountering an issue when attempting to download the three.js file with a specified version in my bower.json file.

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

Error: Unable to locate versions in git://github.com/jiyinyiyong/three.js.git

As a workaround, I am currently downloading the entire repository by specifying the URL like so:

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

This method is proving to be time-consuming and taking up unnecessary space. Is there a way to only download the specific file from the Git repo?

Answer №1

Remove the period from three.js, for example:

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

This refers to the official ThreeJS repository.

If you prefer to only use the minified library file (which is a much smaller download), you can use:

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

Answer №2

To easily add Three.js to your project, just enter bower install three.js in your command line.
After running the command, Three.js will be successfully installed in the directory: .../bower_components/three.js

Answer №3

The bower registry entry for the three.js package is linked to https://github.com/jiyinyiyong/three.js, which is not the official repository for three.js. This particular repository contains only two .js files: three.js and three.min.js.
The absence of tags in this repository means that bower cannot identify a version for the package. The latest version can be found in the master branch. To install the most recent version from the master branch, you should specify the dependency as follows:

"dependencies": {
    "three.js": "master"
}

It's important to note that relying on a specific branch may come with drawbacks, as its contents are likely to change in the future.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Command-sending ASP page on Android browser controlling a Windows PC

I'm curious about how I can send commands, such as 1, 2, 3, etc., from a web app (classic ASP/ASP.NET) on my Android web browser to a Windows computer on the same LAN network. I want to create a web page with buttons that can act as an instant messeng ...

Executing multiple JQuery post requests simultaneously

I am currently working with three functions, each of which posts to a specific PHP page to retrieve data. However, since each PHP script requires some processing time, there is a delay in fetching the data. function nb1() { $.post("p1.php", { ...

Could you please provide me with the option to send a list of the

Is there a way to send output via email instead of displaying it in the following div: <div id="fullCalendar" ></div> After spending a whole night searching online, I couldn't find a solution. As I'm not very familiar with jQuery pr ...

Divide a string into separate array items where a specific character is found

Within my sentence are several characters (~). I want to split the text before each ~ into an array item, and then add a <br /> tag at the end of each item. I attempted using the replace method but it only worked for the first ~ and disregarded the ...

The radius calculation from THREE.BufferGeometry.computeBoundingSphere() resulted in a NaN value

While inspecting my website, I encountered an error in the console: chunk-DKIGWELO.js?v=a524ab5d:7212 THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. It seems that the "position" attribute may contain NaN values. _BufferGeometry I ke ...

Activate BootstrapValidator to dynamically enable or disable the submit button as you type

Is there a way to keep the submit button enabled while typing in BootstrapValidator? ...

Vue-Routes is experiencing issues due to a template within one of the routes referencing the same ID

I encountered an issue while developing a Vue application with Vue-routes. One of the routes contains a function designed to modify the background colors of two divs based on the values entered in the respective input fields. However, I am facing two probl ...

Code for refreshing content using AJAX

I'm looking for AJAX code to set a value in a session. For instance: $_SESSION['verif_code'] I want to generate a random number and assign it to this session. I need some AJAX code to refresh this random number function and set the value ...

What causes the index to consistently be the final index when passing it to the MenuItem onClick function while iterating over a State array using map?

There is an array of objects living in a state named talks [ { "firstName": "B", "lastName": "W", "day": "2022-09-30T23:06:26.000Z", "reasons": [ ...

Pass information to CGI script and return using jQuery.ajax

Currently, I am utilizing jQuery.ajax() to transmit HTML form data from my frontend to a Perl script on the server and then receive some information back. The preferred format for this information is text or string. Additionally, I need to store it as a v ...

display or conceal a div when a radio button is selected

I need a way to display a specific div containing unique text once a radio button is selected, while hiding all other div sections. <?php foreach ($items as $item){ $i=1; echo ' <div class="form-check"> <input class="fo ...

Failure to resolve security hole in package (svg-sprite-loader)

Update 3: I'm uncertain about the main issue here - whether it's a problem with the package itself or something I might be doing incorrectly when attempting to resolve it. It would be helpful to know if anyone has successfully installed the depen ...

Executing two Ajax calls in ReactJS with different parameters can improve the efficiency of your

Why does the second Ajax call overwrite the first one, causing the results to be different each time I refresh it? In the first Ajax call, I have set tests: [], testsHistories: [] in the setState function. However, the second Ajax call only sets the stat ...

Mongoose encountered a RangeError due to exceeding the maximum call stack size

I need to bulk insert documents into MongoDB using the native driver instead of Mongoose to enhance the writing speed. Mongoose does not support bulk insert of an array of documents, prompting me to bypass it. However, I encountered the "RangeError: Maxim ...

Aligning a pair of MDC drawers

I am facing a challenge on my webpage where I have implemented two Material Design Component drawers with identical items. One is set to be permanent for desktop and tablet displays, while the other is designed to be hidden or modal for mobile devices. &l ...

unable to append double quotation marks at the end of a string in node.js

I have a large translation file and I need to add double quotes at the end of each string. My Objective. input string ===> _your_report_is_being_prepared = Your report is being prepared desired output ===> "_your_report_is_being_prepared" : "Your ...

What is the best way to link function calls together dynamically using RXJS?

I am seeking a way to store the result of an initial request and then retrieve that stored value for subsequent requests. Currently, I am utilizing promises and chaining them to achieve this functionality. While my current solution works fine, I am interes ...

What are some effective methods for testing internet connectivity?

My CMS operates by pulling large amounts of data using PHP, MySQL, jQuery, Bootstrap, and AJAX. An issue arises when the internet connection is lost, causing problems with displaying and scrolling on the site. I am interested in finding a solution that c ...

React component's state is not being correctly refreshed on key events

Currently facing an issue that's puzzling me. While creating a Wordle replica, I've noticed that the state updates correctly on some occasions but not on others. I'm struggling to pinpoint the exact reason behind this discrepancy. Included ...

Error encountered when trying to access Proxy Object or Object[] in MobX with TypeScript

In my MobX Store, I have a straightforward structure: import { observable, action, makeObservable } from "mobx" import { BoxShadow, ShadowValues } from "./types" import { boxShadow } from "./constants" interface IStore { ...