Failed: install bower dependencies

Problem

While installing Open edX, the installation failed on the bower dependencies:

TASK [insights : install bower dependencies] ***********************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ". /edx/app/insights/venvs/insights/bin/activate && . /edx/app/insights/nodeenvs/insights/bin/activate && /edx/app/insights/edx_analytics_dashboard/node_modules/.bin/bower instal

The "fatal" line is very long, but includes this stderr output:

bower requirejs-plugins#~1.0.3                                  invalid-meta The "main" field has to contain only 1 file per filetype; found multiple .js files: ["src/async.js","src/depend.js","src/font.js","src/goog.js","src/image.js","src/json.js","src/mdown.js","src/noext.js","src/propertyParser.js","lib/Markdown.Converter.js","lib/text.js"]
bower bootstrap-sass-official#v3.2.0+2                          invalid-meta The "main" field cannot contain font, image, audio, or video files
bower bootstrap-sass-official#v3.2.0+2                          invalid-meta The "main" field cannot contain font, image, audio, or video files
bower bootstrap-sass-official#v3.2.0+2                          invalid-meta The "main" field cannot contain font, image, audio, or video files
bower bootstrap-sass-official#v3.2.0+2                          invalid-meta The "main" field cannot contain font, image, audio, or video files
bower bootstrap-sass-official#v3.2.0+2                          invalid-meta The "main" field has to contain only 1 file per filetype; found multiple .js files: ["assets/javascripts/bootstrap/affix.js","assets/javascripts/bootstrap/alert.js","assets/javascripts/bootstrap/button.js","assets/javascripts/bootstrap/carousel.js","assets/javascripts/bootstrap/collapse.js","assets/javascripts/bootstrap/dropdown.js","assets/javascripts/bootstrap/tab.js","assets/javascripts/bootstrap/transition.js","assets/javascripts/bootstrap/scrollspy.js","assets/javascripts/bootstrap/modal.js","assets/javascripts/bootstrap/tooltip.js","assets/javascripts/bootstrap/popover.js"]
bower datatables#~1.10.2                                        invalid-meta The "main" field cannot contain font, image, audio, or video files
bower datatables#~1.10.2                                        invalid-meta The "main" field cannot contain font, image, audio, or video files
bower datatables#~1.10.2                                        invalid-meta The "main" field cannot contain font, image, audio, or video files
bower datatables#~1.10.2                                        invalid-meta The "main" field cannot contain font, image, audio, or video files
bower datatables#~1.10.2                                        invalid-meta The "main" field cannot contain font, image, audio, or video files
bower datatables#~1.10.2                                        invalid-meta The "main" field has to contain only 1 file per filetype; found multiple .png files: ["media/images/sort_asc.png","media/images/sort_asc_disabled.png","media/images/sort_both.png","media/images/sort_desc.png","media/images/sort_desc_disabled.png"]
bower bootstrapaccessibilityplugin#~1.0.3                           mismatch Version declared in the json (1.0.2) is different than the resolved one (1.0.4)
bower backbone.babysitter#^0.1.0                                    mismatch Version declared in the json (0.1.11) is different than the resolved one (0.1.12)
bower datamaps#~0.3.4                                               mismatch Version declared in the json (0.3.4) is different than the resolved one (0.3.7)
bower lunr.js#^0.7.0                                                mismatch Version declared in the json (0.7.1) is different than the resolved one (0.7.2)
bower underscore                                            extra-resolution Unnecessary resolution: underscore#~1.8.2
bower cldrjs                                                extra-resolution Unnecessary resolution: cldrjs#~0.4.4
bower moment                                                extra-resolution Unnecessary resolution: moment#~2.17.1
bower                                                                ECMDERR Failed to execute "./bower-post-install.sh", exit code of #137 ./bower-post-install.sh: line 33: 17286 Killed                  sassc ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr.scss ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr-compiled.scss

Additional error details:
./bower-post-install.sh: line 33: 17286 Killed                  sassc ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr.scss ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr-compiled.scss

The exit code of 137, and the "Killed" message, indicate that the process was using too much memory.

Solution

This failure happens when you try to install on too small a machine.  Check the installation instructions for the required amount of RAM, and be sure you have enough.