DSpace / dspace-angular

DSpace User Interface built on Angular.io
https://wiki.lyrasis.org/display/DSDOC8x/
BSD 3-Clause "New" or "Revised" License
131 stars 429 forks source link

error Command failed with exit code 137. #1339

Closed kdenzel closed 3 years ago

kdenzel commented 3 years ago

Describe the bug I got a Problem with the quickstart guide. I cloned the repository and did the steps like described but it always fails with exit code 137.

$ yarn start
yarn run v1.22.11
$ yarn run start:prod
$ yarn run build:prod && yarn run serve:ssr
$ yarn run config:prod
$ ts-node --project ./tsconfig.ts-node.json scripts/set-env.ts --prod
Building production environment
No specific environment file found for --prod
Angular environment.ts file generated correctly at ./src/environments/environment.ts

$ yarn run build:ssr
$ yarn run build:client-and-server-bundles && yarn run compile:server
$ ng build --prod && ng run dspace-angular:server:production --bundleDependencies true
Warning: Entry point 'angular2-text-mask' contains deep imports into '/home/debian/dspace-angular/node_modules/text-mask-core/dist/textMaskCore'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
69% building 653/658 modules 5 active .../webpack/src/index.js!/home/debian/dspace-angular/node_modules/@ngtools/webpack/src/index.js!/home/debian/dspace-angular/src/app/core/submission/vocabularies/models/vocabulary.model.tsKilled
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

To Reproduce Steps to reproduce the behavior:

git clone https://github.com/DSpace/dspace-angular.git

cd dspace-angular

yarn install

yarn start

Expected behavior A working test environment of the frontend

Versions used nvm 0.38 npm 6.14.15 yarn 1.22.11 node 14.18.0

OS used Debian 10

tdonohue commented 3 years ago

@kdenzel : If you google that error code from Yarn, it says that exit code 137 means the build ran out of memory. See for example https://jcutrer.com/javascript/yarn-build-exit-code-137

The DSpace UI needs at least 2GB of memory to build...but more memory will build faster (so 4-8GB is recommended). This does mean though that if your entire machine has only 2-3GB of memory, you may hit issues, as some of that memory will be reserved for other processes, and is unavailable to Yarn/Node.

Closing this as answered. If you need additional help/support, please use one of the support channels/mailing lists listed at https://wiki.lyrasis.org/display/DSPACE/Support