What is the reason for Bower consistently choosing to download the Angular version 1.5.9-build.5086+sha...?

Struggling to manage my front end dependencies using bower.json. No matter how I specify the version of Angular in bower, a different version is downloaded every time. The issue is that many functionalities in my code rely on previous versions of Angular, causing errors like deprecation of $http.post.success(). I specifically need Angular v1.4.8, but it continues to download v1.5.9.build instead. Below are the methods I tried in my attempt to download the package from bower.json:

1) Mentioning only the versions:

"dependencies": {
"angular": "1.4.8",
"jquery": "2.1.4"
 },
"resolutions": {
"jquery": "2.1.4",
"angular": "1.4.8"

2) Trying a different approach by providing the full path of the repo on Github:

"dependencies": {
"angular": "https://github.com/angular/bower-angular.git#1.4.8",
"jquery": "2.1.4"
 },
"resolutions": {
"jquery": "2.1.4",
"angular": "https://github.com/angular/bower-angular.git#1.4.8"

Any assistance would be highly appreciated.

Answer №1

It seems that the issue in my particular case stemmed from git within Visual Studio Web Tools being located at

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git

Although bower attempted to install the correct versions, a look into the bower cache revealed that the downloaded files did not align.

Possible Solutions:

  • Install Git for Windows
  • Delete %USERPROFILE%\AppData\Local\bower
  • Restart Visual Studio
  • Delete wwwroot/lib and Restore bower packages

You may need to update the path of the current git.exe in Visual Studio.

To do so:

Tools>Options>ProjectsandSolutions>ExternalTools

View the original response here

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

Having trouble with images not showing up on React applications built with webpack?

Hey there! I decided not to use the create react app command and instead built everything from scratch. Below is my webpack configuration: const path = require("path"); module.exports = { mode: "development", entry: "./index.js", output: { pa ...

Having trouble retrieving POST data with the Webextensions API

Looking to retrieve POST data using a Webextensions API on page load. Implemented a background script with the code below: browser.webRequest.onBeforeSendHeaders.addListener( getPostData, { urls: ['<all_urls>'], types: ["main_fr ...

Utilize AJAX, jQuery, and Symfony2 to showcase array information in a visually appealing table format

I have a requirement to showcase data utilizing ajax and jQuery in a table on my twig file. The ajax call is made with a post request to the controller, where the controller attempts to input several rows from a csv file into the database. However, there ...

ESLint is not performing linting even though the server is operational

I found a frontend template online and successfully installed all the packages using yarn. However, although I have an .eslint.json file in place and the ESLint extension is installed in Visual Studio Code, I am not seeing any linting errors. Below is the ...

Linking the creation of dynamic elements to specific keypress events using AngularJS

I'm exploring how to add an element to the DOM based on user input using AngularJS. The desired behavior includes: User enters text in an input field bound to "newTask" via ng-model User hits the enter key A new element is dynamically added to the D ...

Innovative way to design a menu using HTML, CSS, and JavaScript that dynamically resizes to a specific width

I'm currently working on a website and I'm trying to create a menu with specific width of 700px. However, I'm unsure whether to tackle this using CSS, JavaScript, or a combination of both. Which approach would be the most straightforward for ...

What is the best way to choose the current Div's ID, as well as its Width and Height properties?

Within this section, there are four div elements with varying widths, heights, and colors that appear and disappear when their respective buttons are clicked. I am adding an "activeDiv" class to the visible div in order to easily select it using that class ...

What could be causing my cmd to report an error stating that it is unable to locate the node-modules

https://i.sstatic.net/4ztfB.png Take a look at my command prompt below. Do I need to keep the module folder and the code folder in the same directory? ...

Exploring the possibility of detecting page scrolling in Javascript by clicking on scroll bars

I have implemented a unique feature on my page that allows users to scroll up and down using custom buttons I created. This functionality is achieved by smoothly transitioning between anchor points on the page using jQuery's animate function. However ...

Encountering a 'Cannot Get /' Error while attempting to reach the /about pathway

I attempted to create a new route for my educational website, and it works when the route is set as '/', but when I try to link to the 'about' page, it displays an error saying 'Cannot Get /about' Here is the code from app.js ...

Steps for updating the dependency of a package listed in the package-lock.json file

Our goal is to upgrade the lodash version to 4.17.11, which is a dependency of grunt-angular-translate. The current version of grunt-angular-translate in package.json is 0.3.0, but updating it does not automatically update the lodash version. How can we en ...

Dynamic menu bar accompanied by primary content

I'm facing an issue with my active navigation bar. Whenever I open the hamburger menu, the main content remains fixed and does not move along with the open navigation menu. I tried searching online for a solution but couldn't find anything helpfu ...

Tips for ensuring that a server waits until a database connection is successfully established using node.js, MongoDB, and Express

I have a server.js file and a database.js file In the server.js file, I have the following code: const express = require('express'); var db = require('./database'); const app = express(); . . some get/post methods app.listen(3000); . ...

Steps to address vulnerabilities in @vue/cli

I am currently working on a vuejs-3 project and aiming for 0 vulnerabilities. However, upon running npm install, I encounter 48 vulnerabilities with the current version of node and npm. Even after trying npm audit fix --force, the issue persists. Can anyon ...

Display a page containing two distinct JSON arrays using Angular

Working with two separate JSON Arrays and incorporating them into a view using ng-repeat. The first JSON array contains text values used to generate fields. ["center", "80mm", "retain", "22pt", "bold", "140%", "18pt", "bold", "140%", "36pt", "11pt", "bol ...

How to update the date format in v-text-field

I have run into an issue while working on a Vue.js project that utilizes Vuetify. The problem lies with the default date format of the v-text-field when its type is set to "date." Currently, the format shows as mm/dd/yyyy, but I need it to display in the y ...

Steps to configure JavaScript to initially conceal a div within a continuous loop

I have implemented a JavaScript function to toggle the show/hide functionality of a div class. The content of the div and the button that triggers the toggle action are both inside a while loop. Initially, I used "div id" in my JavaScript code, but it was ...

Personalizing MaterialUI's autocomplete functionality

Trying to implement the material-UI Autocomplete component in my react app and looking for a way to display a div when hovering over an option from the list, similar to what is shown in this reference image. View example If anyone has any tips or suggest ...

What causes a globally declared array to remain empty in the global scope even after data is pushed to it within a callback function?

Initially, I set an empty array as the value for the global variable artistURLs. Then, within the Cheerio .each() iterator method, I push strings (stored in the local variable artistURL) into the artistURLs array. var request = require('request&apos ...

Encountering an issue with npm installation on AWS Ubuntu

I need assistance with deploying my Angular 2 application on AWS Ubuntu. While I was able to successfully install npm on Ubuntu, I encountered an error when trying to build my application using "npm install". The error mentions something about "extract:typ ...