Bower install seems to be consistently failing for multiple packages for me. I've tried removing the below (nestable) package mention and it then fails for others.
I've tried setting the git settings -
git config --global url."https://github.com/".insteadOf git#github.com:
git config --global url."https://".insteadOf git://
but still fails. I've even tried to point the nestable package to the correct github repo, but still fails. Same keeps happening for some other packages also, not for all packages though.
bower progress nestable#* remote: Compressing objects: 20% (1/5)
bower progress nestable#* remote: Compressing objects: 40% (2/5)
bower progress nestable#* remote: Compressing objects: 60% (3/5)
bower progress nestable#* remote: Compressing objects: 80% (4/5)
bower progress nestable#* remote: Compressing objects: 100% (5/5)
bower progress nestable#* remote: Compressing objects: 100% (5/5), done.
bower invalid-meta nestable is missing "main" entry in bower.json
bower invalid-meta nestable is missing "ignore" entry in bower.json
bower resolved git://github.com/dbushell/Nestable.git#4f93032cfa
bower ENOTFOUND getaddrinfo ENOTFOUND vox.spacefiles
Stack trace:
Error: getaddrinfo ENOTFOUND vox.spacefiles
at errnoException (dns.js:44:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
From previous event:
at UrlResolver.Resolver.resolve (C:\Users\DevAdmin\AppData\Roaming\npm\node_
modules\bower\lib\core\resolvers\Resolver.js:100:6)
at PackageRepository._resolve (C:\Users\DevAdmin\AppData\Roaming\npm\node_mo
dules\bower\lib\core\PackageRepository.js:175:21)
at C:\Users\DevAdmin\AppData\Roaming\npm\node_modules\bower\lib\core\Package
Repository.js:77:29
Console trace:
Error
at StandardRenderer.error (C:\Users\DevAdmin\AppData\Roaming\npm\node_module
s\bower\lib\renderers\StandardRenderer.js:82:37)
at Logger.<anonymous> (C:\Users\DevAdmin\AppData\Roaming\npm\node_modules\bo
wer\bin\bower:110:22)
at Logger.emit (events.js:107:17)
at Logger.emit (C:\Users\DevAdmin\AppData\Roaming\npm\node_modules\bower\nod
e_modules\bower-logger\lib\Logger.js:29:39)
at C:\Users\DevAdmin\AppData\Roaming\npm\node_modules\bower\lib\commands\ind
ex.js:45:20
at _rejected (C:\Users\DevAdmin\AppData\Roaming\npm\node_modules\bower\node_
modules\q\q.js:844:24)
at C:\Users\DevAdmin\AppData\Roaming\npm\node_modules\bower\node_modules\q\q
.js:870:30
at Promise.when (C:\Users\DevAdmin\AppData\Roaming\npm\node_modules\bower\no
de_modules\q\q.js:1122:31)
at Promise.promise.promiseDispatch (C:\Users\DevAdmin\AppData\Roaming\npm\no
de_modules\bower\node_modules\q\q.js:788:41)
at C:\Users\DevAdmin\AppData\Roaming\npm\node_modules\bower\node_modules\q\q
.js:604:44
System info:
Bower version: 1.4.1
Node version: 0.12.6
OS: Windows_NT 6.3.9600 x64
Below is the bower.json
{
"name": "Demo",
"version": "0.0.0",
"authors": [
"#clo"
],
"description": "Demo",
"main": "index.html",
"keywords": [
"bootstrap",
"angular",
"admin",
"theme",
"dashboard"
],
"ignore": [
"**/.*"
],
"dependencies": {
"Flot": "flot/flot#0.8.3",
"angular-loading-bar": "0.7.0",
"angular-translate": "2.6.0",
"angular-ui-router": "0.2.13",
"angular": "1.3.13",
"angular-i18n": "1.3.13",
"angular-route": "1.3.13",
"angular-bootstrap": "0.12.1",
"angular-cookies": "1.3.13",
"angular-translate-loader-url": "2.6.0",
"angular-translate-loader-static-files": "2.6.0",
"angular-translate-storage-local": "2.6.0",
"angular-translate-storage-cookie": "2.6.0",
"angular-animate": "1.3.13",
"angular-ui-utils": "0.2.2",
"angularjs-toaster": "0.4.8",
"flatdoc": "0.9.0",
"fontawesome": "4.2.0",
"oclazyload": "0.5.2",
"screenfull": "2.0.0",
"slimScroll": "1.3.3",
"weather-icons": "1.3.2",
"moment": "2.9.0",
"chosen_v1.2.0": "https://github.com/harvesthq/chosen/releases/download/v1.2.0/chosen_v1.2.0.zip",
"flot-spline": "*",
"flot.tooltip": "0.8.4",
"ngstorage": "0.3.0",
"jquery-ui": "1.11.3",
"jqueryui-touch-punch": "*",
"seiyria-bootstrap-slider": "4.5.0",
"jquery.inputmask": "3.1.61",
"bootstrap-wysiwyg": "*",
"ika.jvectormap": "*",
"jquery": "2.1.3",
"fullcalendar": "2.2.7",
"animate.css": "3.2.1",
"fastclick": "1.0.6",
"modernizr": "2.8.3",
"animo.js": "ThrivingKings/animo.js#1.0.2",
"jquery-classyloader": "http://www.class.pm/files/jquery-classyloader.zip",
"whirl": "1.0.0",
"skycons": "darkskyapp/skycons",
"jQuery-gMap": "marioestrada/jQuery-gMap#2.1.5",
"ngDialog": "0.3.11",
"codemirror": "5.0.0",
"marked": "0.3.3",
"bootstrap-tagsinput": "0.4.2",
"ngWig": "stevermeister/ngWig#0.8.5",
"bootstrap-filestyle": "1.1.2",
"parsleyjs": "2.0.7",
"datatables": "1.10.5",
"datatables-colvis": "1.1.1",
"angular-sanitize": "1.3.13",
"angular-resource": "1.3.13",
"angular-chosen-localytics": "1.0.6",
"ng-table": "0.5.1",
"ng-table-export": "*",
"simple-line-icons": "0.1.1",
"angular-bootstrap-nav-tree": "*",
"nestable": "*",
"html.sortable": "0.1.8",
"angular-xeditable": "0.1.8",
"angular-file-upload": "1.1.5",
"ng-img-crop": "0.3.2",
"angular-ui-select": "0.9.6",
"angular-ui-codemirror": "0.2.2",
"angular-carousel": "0.3.10",
"angular-touch": "1.3.13",
"angular-dynamic-locale": "0.1.27",
"ng-grid": "2.0.14",
"ngInfiniteScroll": "1.2.0",
"Chart.js": "~1.0.1"
},
"resolutions": {
"jquery-ui": "1.11.3",
"jquery": "2.1.3",
"fullcalendar": "2.2.7",
"angular": "1.3.13",
"weather-icons": "1.3.2",
"jquery.inputmask": "3.1.61",
"angular-cookies": "1.3.13",
"angular-translate": "2.6.0",
"angular-translate-storage-cookie": "2.6.0",
"angular-loading-bar": "0.7.0",
"angular-bootstrap": "0.12.1",
"angular-translate-loader-url": "2.6.0",
"angular-translate-loader-static-files": "2.6.0",
"angular-translate-storage-local": "2.6.0",
"angular-ui-utils": "0.2.2",
"flatdoc": "0.9.0",
"screenfull": "2.0.0",
"moment": "2.9.0",
"seiyria-bootstrap-slider": "4.5.0",
"animate.css": "3.2.1",
"fastclick": "1.0.6",
"ngDialog": "0.3.11",
"codemirror": "5.0.0",
"marked": "0.3.3",
"parsleyjs": "2.0.7",
"datatables": "1.10.5",
"ng-table": "0.5.1"
}
}
EDIT
Am seeing that its failing randomly for packages
bower resolved git://github.com/angular/bower-angular-i18n.git#1.3.13
bower resolved git://github.com/FortAwesome/Font-Awesome.git#4.2.0
bower ENOTFOUND getaddrinfo ENOTFOUND vox.spacefiles
Stack trace:
Error: getaddrinfo ENOTFOUND vox.spacefiles
at errnoException (dns.js:44:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
And if I try to do a manual install of the individual package that seems to fail, it succeeds for that.
What can be going wrong?
I also faced same issue, It's from your bower.json file.
In my case, the source URL is no more in use. I purchased a theme from here theme
So there is one dependency from the URL
"jquery-classyloader": "https://vox.space/file_download/24/jquery-classyloader.zip"
Surprisely vox.space is no more alive, So every time I got ENOTFOUND getaddrinfo ENOTFOUND vox.space vox.space
You also need to validate the existence of some dependency in your code and remove it if not necessary.
Related
I have an Angular 1.6 project which did build using:
node 10.16.0
bower 1.8.14
gulp 3.9.1
and with the command sequence:
npm install
bower install
gulp
It now breaks at the bower install step with the file-saver.js#~1.20150507.2 throwing error:
Failed to execute "git ls-remote --tags --heads https://github.com/Teleborder/FileSaver.js.git", exit code of #128
Because of this, I have removed the line
"angular-file-saver": "^1.1.3"
from the bower.json file (bower uninstall did not work for that package) and installed the angular-file-saver package via
npm install angular-file-saver --save-dev
So now the package.json looks like this:
{
"name": "app",
"version": "1.0.0",
"description": "app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"app"
],
"author": "me",
"license": "ISC",
"devDependencies": {
"angular-file-saver": "^1.1.3",
"del": "^2.2.2",
"eslint-config-angular": "^0.5.0",
"eslint-plugin-angular": "^1.5.0",
"gulp": "^3.9.1",
"gulp-angular-filesort": "^1.1.1",
"gulp-angular-templatecache": "^2.0.0",
"gulp-autoprefixer": "^3.1.1",
"gulp-cheerio": "^0.6.2",
"gulp-clean-css": "^2.2.2",
"gulp-concat": "^2.6.1",
"gulp-eslint": "^3.0.1",
"gulp-filter": "^4.0.0",
"gulp-flatten": "^0.3.1",
"gulp-htmlmin": "^3.0.0",
"gulp-if": "^2.0.2",
"gulp-inject": "^4.1.0",
"gulp-ng-annotate": "^2.0.0",
"gulp-rev": "^7.1.2",
"gulp-sass": "^3.0.0",
"gulp-sourcemaps": "^1.9.1",
"gulp-string-replace": "^0.3.1",
"gulp-uglify": "^2.0.0",
"main-bower-files": "^2.13.1",
"natives": "^1.1.6",
"require-dir": "^0.3.1",
"rimraf": "^2.6.2",
"stream-series": "^0.1.1",
"uglify-save-license": "^0.4.1",
"yargs": "^6.5.0"
},
"dependencies": {
"bower": "^1.8.4"
}
}
My src\app.js contains this:
(function(angular) {
'use strict';
angular
.module('app', [
'angular-cache',
'ui.router',
'ui.router.modal',
'ui.bootstrap',
'ui.bootstrap-slider',
'ui.validate',
'angular-confirm',
'ngAnimate',
'ngFileSaver',
'angularMoment',
'pascalprecht.translate',
'tmh.dynamicLocale']);
}(window.angular));
And my controller contains this:
angular
.module('app')
.component('readings', {
controllerAs: 'vm',
templateUrl: 'readings/readings.html',
controller: ReadingsController
});
function ReadingsController(..., FileSaver, ...) {
So, now this command sequence works:
npm install
bower install
gulp
But I get this error in the browser
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module ngFileSaver due to:
Error: [$injector:nomod] Module 'ngFileSaver' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.6.0/$injector/nomod?p0=ngFileSaver
How can I get this package working via npm instead of bower?
I've inherited a Rails application and I'm trying to get it to build manually in production
The application uses
webpacker-3.5.5 ruby gem to manage JavaScript assets
webpack v3.12.0
sprockets gem to manage traditional CSS / Image assets
As part of the webpacker gem config, it uses babel-loader on JSX/React assets particularly. I'm not quite sure what this does, but I'm guessing it's some sort of pre-processor?
module.exports = {
test: /\.jsx?$/,
exclude: /node_modules/,
use: [{
loader: "babel-loader",
options: {
cacheDirectory: true,
// Use .babelrc - not webpack config JS - to define all options
babelrc: true
}
}]
}
When I try to run rake assets:precompile on the production server, it errors on the step where it tries to build assets with webpack
> rake assets:precompile
yarn install v1.17.3
warning package.json: No license field
warning delly#1.0.0: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 1.18s.
Webpacker is installed 🎉 🍰
Using /app/config/webpacker.yml file for setting up webpack paths
Compiling…
Compilation failed:
Hash: 27785324c8b2ba6004dd
Version: webpack 3.12.0
Time: 119ms
Asset Size Chunks Chunk Names
manifest.json 2 bytes [emitted]
ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in '/app'
ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in '/app'
This does not happen in development locally, only production.
Any idea why this would be erroring? Is babel-loader required in production or can I remove it from production entirely?
Here is my package.json that defines installation of the package:
{
"name": "delly",
"version": "1.0.0",
"scripts": {
"test": "node_modules/.bin/jest --no-cache --config spec/javascript/jest.config.js",
"test:debug": "node --inspect-brk node_modules/.bin/jest --no-cache --config spec/javascript/jest.config.js --colors --verbose"
},
"devDependencies": {
"#babel/cli": "^7.4.4",
"#babel/core": "^7.4.5",
"#babel/plugin-proposal-class-properties": "^7.4.4",
"#babel/plugin-proposal-object-rest-spread": "^7.4.4",
"#babel/plugin-syntax-dynamic-import": "^7.2.0",
"#babel/plugin-transform-modules-commonjs": "^7.4.4",
"#babel/preset-env": "^7.4.5",
"#babel/preset-react": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
"babel-plugin-module-resolver": "^3.2.0",
"eslint": "^4.6.1",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.6.1",
"i18n-js": "^3.2.2",
"jest": "^24.8.0",
"jest-dom": "^3.4.0",
"js-yaml": "^3.13.1",
"react-testing-library": "^7.0.1",
"stylelint": "^9.3.0",
"stylelint-config-rational-order": "^0.0.2",
"webpack-dev-server": "2.11.2"
},
"dependencies": {
"#rails/webpacker": "^3.5.5",
"axios": "^0.19.0",
"core-js": "3",
"html-react-parser": "^0.4.6",
"jquery": "^3.3.1",
"jquery-ujs": "^1.2.2",
"prop-types": "^15.6.1",
"rails-erb-loader": "^5.4.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-on-rails": "^11.3.0",
"react-toggle-switch": "^3.0.4",
"react-transition-group": "1.x",
"react_ujs": "^2.4.4"
}
}
a
When you run rake assets:precompile in production mode, it also runs webpack using production mode, in this case, only packages set in dependencies are loaded, if you review packages.json, babel-loader is set in devDependencies.\
The solution? move babel-loader to dependencies
I've been trying to install angular-ui-tree using bower version 1.8.0, but it keeps hanging up on me.
I've tried the following commands:
bower install angular-ui-tree
bower install angular-ui-tree --save
bower install angular-ui-tree --save --verbose
bower install angular-ui-tree --verbose
Verbose doesn't print a stack trace, however all commands above print the info of already installed packages.
I've also tried using bower init or restoring previous versions of bower.json, but to no avail.
The original bower.json file:
{
"name": "meten",
"version": "0.0.1",
"dependencies": {
"angular": "*",
"bootstrap": "*",
"angular-animate": "*",
"angular-bootstrap": "*",
"angular-cookies": "*",
"angular-resource": "*",
"angular-route": "*",
"angular-sanitize": "*",
"angular-smart-table": "*",
"angular-touch": "*",
"angular-strap": "*",
"angular-nvd3": "*",
"papaparse": "*",
"components-font-awesome": "^4.7.0"
},
"devDependencies": {
"angular-mocks": "*"
},
"appPath": "app",
"moduleName": "metenApp",
"overrides": {
"bootstrap": {
"main": [
"less/bootstrap.less",
"dist/css/bootstrap.css",
"dist/js/bootstrap.js"
]
}
}
}
What can I do to fix bower?
I've been trying to update moment.js (& several other plugins) using Bower, updating moment from 2.8.4 to 2.9.
I changed my bower.json file to be "moment": "2.x" (was ~2.8.3, I also tried ~2.8, then 2.x) & bower says it's cached and validated but running bower list shows 2.8.4 is still installed.
Whenever I try an update or install it goes through all my dependencies.
I then uninstalled moment (which worked), but now bower won't install it, bower list gives moment not installed.
I'm running the latest Bower 1.4.0.
My bower.json:
{
"name": "intranet",
"version": "1.12.35",
"authors": [
"SteB"
],
"license": "proprietary",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "~2.1",
"jquery-migrate": "~1.2",
"modernizr": "~2.8.3",
"moment": "2.x",
"respond": "~1.4.2",
"jquery-ui": "~1.11",
"chartjs": "~1.0.2",
"rickshaw": "~1.5.1",
"gmaps": "~0.4.14",
"d3": "~3.4.11",
"bootstrap-modal": "~2.2.5",
"kbwood_countdown": "~2.0.1",
"bootstrap": "2.3.2",
"footable": "2.0.1.5",
"bootstrap-maxlength": "~1.5.7",
"flot": "~0.8.3",
"jqplot": "*",
"scrollup": "2.4.*",
"fullcalendar": "1.6.4",
"bootstrap-switch": "~2.0.5",
"es5-shim": "~4.1",
"chosen": "~1.2",
"platform": "~1.3",
"fontawesome": "~4.2.0",
"jquery.steps": "~1.1",
"jquery-cookie": "~1.4",
"typeahead.js": "~0.10.5",
"ladda": "~0.9.7"
},
"devDependencies": {},
"resolutions": {
"bootstrap": "2.3.2",
"jquery": "~2.1"
}
}
Delete yr previous "bower_components" folder or any other target installation location specified in ".bowerrc"
Use below bower.json (null to get latest version)
Run "bower install"
{
"name": "intranet",
"version": "1.12.35",
"authors": [
"SteB"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"license": "proprietary",
"dependencies" : {
"jquery": null,
"jquery-migrate": null,
"modernizr": null,
"moment": null,
"respond": null,
"jquery-ui": null
}
}
Above will do fine. You need to check yr rest dependencies on bower bcz there naming seems to be incorrect
I have this code in my webstorm IDE in the Terminal dialog:
bower install angular-ui-router
When I look now in my app/bower_components folder I can see the new created folder with angular-ui-router package.
But what I would have expected is also an entry in the bower.json file:
{
"name": "app",
"version": "0.0.0",
"dependencies": {
"angular": "1.2.6",
"json3": "~3.2.6",
"es5-shim": "~2.1.0",
"jquery": "~1.10.2",
"bootstrap": "~3.0.3",
"angular-resource": "1.2.6",
"angular-sanitize": "1.2.6",
"angular-route": "1.2.6",
"angular-bootstrap": "~0.10.0"
},
"devDependencies": {
"angular-mocks": "1.2.6",
"angular-scenario": "1.2.6"
}
}
I does not see the angular-ui-router anywhere!
Why is that?
You need to use the --save flag to get it in your bower.json:
bower install --save angular-ui-router