Installing Polymer through bower freezes

2019-06-22 11:06发布

问题:

I follow the instructions of the official page to install bower, but when I reach to the command line:

bower install --save Polymer/core-elements

bower get stuck and outputs nothing for a long while, in the end I get a "out of memory" error. What is wrong?

I am using Ubuntu 14.04

回答1:

There's a cyclical issue with Bower that's been fixed on master but hasn't made it to a release yet. https://github.com/bower/bower/issues/1169



回答2:

according to http://github.com/bower/bower/issues/1324 there is a workaround.

edit bower.json by adding in a line so the dependency area looks like this

dependencies": {
    "polymer": "Polymer/polymer#~0.3.1", 
    "core-elements": "Polymer/core-elements"
  }

then run $ bower update

you can add other packages, too.

I'm actually brand new to polymer (had trouble installing it, as you can imagine) so I'm not positive this works.