Search code examples
node.jsgitbower-install

Not able to run bower.json file - from NPM command


I am working behind a corporate office. I got the download rights and I can able to download the yeoman package even bower package using the NPM command. I got the permission for download from registry.npmjs and git.

Now I am trying to run a bower.json but i am not able to download anything. i keep getting timeouts. Is i require special permission for to run the bower.json ? or I can make any config to run the bower.json?

attached screen shot for my error reference.

enter image description here

still here is the error I am getting:

bower retry         Request to https://bower.herokuapp.com/packages/angular-rout
e failed with ETIMEDOUT, retrying in 15.5s
bower retry         Request to https://bower.herokuapp.com/packages/jquery.ui fa
iled with ETIMEDOUT, retrying in 16.5s
bower retry         Request to https://bower.herokuapp.com/packages/angular-cook
ies failed with ETIMEDOUT, retrying in 25.9s
bower retry         Request to https://bower.herokuapp.com/packages/angular fail
ed with ETIMEDOUT, retrying in 17.1s
bower retry         Request to https://bower.herokuapp.com/packages/angular-sani
tize failed with ETIMEDOUT, retrying in 23.1s
bower retry         Request to https://bower.herokuapp.com/packages/hammerjs fai
led with ETIMEDOUT, retrying in 30.5s
bower retry         Request to https://bower.herokuapp.com/packages/jquery-hamme
rjs failed with ETIMEDOUT, retrying in 29.9s
bower retry         Request to https://bower.herokuapp.com/packages/bootstrap fa
iled with ETIMEDOUT, retrying in 24.4s
bower retry         Request to https://bower.herokuapp.com/packages/jasmine-jque
ry failed with ETIMEDOUT, retrying in 20.3s
bower ETIMEDOUT     Request to https://bower.herokuapp.com/packages/angular-anim
ate failed: connect ETIMEDOUTbower retry         Request to https://bower.herokuapp.com/packages/angular-rout
e failed with ETIMEDOUT, retrying in 15.5s
bower retry         Request to https://bower.herokuapp.com/packages/jquery.ui fa
iled with ETIMEDOUT, retrying in 16.5s
bower retry         Request to https://bower.herokuapp.com/packages/angular-cook
ies failed with ETIMEDOUT, retrying in 25.9s
bower retry         Request to https://bower.herokuapp.com/packages/angular fail
ed with ETIMEDOUT, retrying in 17.1s
bower retry         Request to https://bower.herokuapp.com/packages/angular-sani
tize failed with ETIMEDOUT, retrying in 23.1s
bower retry         Request to https://bower.herokuapp.com/packages/hammerjs fai
led with ETIMEDOUT, retrying in 30.5s
bower retry         Request to https://bower.herokuapp.com/packages/jquery-hamme
rjs failed with ETIMEDOUT, retrying in 29.9s
bower retry         Request to https://bower.herokuapp.com/packages/bootstrap fa
iled with ETIMEDOUT, retrying in 24.4s
bower retry         Request to https://bower.herokuapp.com/packages/jasmine-jque
ry failed with ETIMEDOUT, retrying in 20.3s
bower ETIMEDOUT     Request to https://bower.herokuapp.com/packages/angular-anim
ate failed: connect ETIMEDOUT

How can i come over it? any help please?

UPDATE

As like the sugession from Ben Diamant : I added a new .bowerrc file, where my bower.json nested, But I am getting this error: what is wrong here?

C:\Users\mb112830\AppData\Roaming\npm\node_modules\bower\node_modules\bower-conf
ig\lib\util\rc.js:55
        throw error;
              ^
Error: Unable to parse D:\Projects\AMP\runtime\ui\ui-widgets\ui-widgets-web\.bow
errc: Unexpected token p
    at parse (C:\Users\mb112830\AppData\Roaming\npm\node_modules\bower\node_modu
les\bower-config\lib\util\rc.js:48:21)
    at json (C:\Users\mb112830\AppData\Roaming\npm\node_modules\bower\node_modul
es\bower-config\lib\util\rc.js:70:12)
    at rc (C:\Users\mb112830\AppData\Roaming\npm\node_modules\bower\node_modules
\bower-config\lib\util\rc.js:31:9)
    at Config.load (C:\Users\mb112830\AppData\Roaming\npm\node_modules\bower\nod
e_modules\bower-config\lib\Config.js:14:20)
    at Function.Config.read (C:\Users\mb112830\AppData\Roaming\npm\node_modules\
bower\node_modules\bower-config\lib\Config.js:49:19)
    at Object.<anonymous> (C:\Users\mb112830\AppData\Roaming\npm\node_modules\bo
wer\lib\config.js:3:38)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

What is wrong here, any one highlight me please?


Solution

  • Looks like your firewall is blocking, you need to run bower behind the corp proxy:

    Edit .bowerrc with proxy configuration -

    {
        "proxy":"http://<host>:<port>",
        "https-proxy":"http://<host>:<port>"
    }