i am trying to creating a build and getting below error
11 silly lifecycle [email protected]~start: Returned: code: 139 signal: null
11 silly lifecycle [email protected]~start: Returned: code: 139 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Exit status 139
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
also sometimes getting same error while start the Server
below is my package.json
{
"name": "corporate-solutions",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --ec true --port 4203 --host 0.0.0.0",
"build": "node --max_old_space_size=5300 ./node_modules/.bin/ng build --prod",
"win-build": "node --max_old_space_size=5300 ./node_modules/@angular/cli/bin/ng build --prod",
"build-notify": "node --max_old_space_size=5300 ./node_modules/.bin/ng build --prod && echo 'message: Build Completed' | zenity --notification --listen",
"build-push": "node --max_old_space_size=5300 ./node_modules/.bin/ng build --prod && ./distupload.sh",
"gitbuild": "ng build --prod --base /start-angular/SB-Admin-BS4-Angular-4/master/dist/",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"start:dynamic": "npm run build:dynamic && npm run serve:dynamic",
"start:static": "npm run build:static && npm run serve:static",
"build:client-and-server-bundles": "ng build --prod && ng build --prod --app 1 --output-hashing=false",
"build:static": "npm run build:client-and-server-bundles && npm run webpack:server && npm run generate:static",
"build:dynamic": "npm run build:client-and-server-bundles && npm run webpack:server",
"generate:static": "cd dist && node prerender",
"webpack:server": "webpack --config webpack.server.config.js --progress --colors",
"serve:static": "cd dist/browser && http-server",
"serve:dynamic": "node dist/server"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/cdk": "^5.2.3",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/material": "^5.2.3",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/platform-server": "^4.3.6",
"@angular/router": "^5.0.0",
"@fortawesome/angular-fontawesome": "0.1.0-9",
"@fortawesome/fontawesome-svg-core": "^1.2.0-11",
"@fortawesome/free-brands-svg-icons": "^5.1.0-8",
"@fortawesome/free-solid-svg-icons": "^5.1.0-8",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.8",
"@ng-idle/core": "^2.0.0-beta.15",
"@ng-idle/keepalive": "^2.0.0-beta.15",
"@nguniversal/express-engine": "^1.0.0-beta.3",
"@nguniversal/module-map-ngfactory-loader": "^1.0.0-beta.3",
"@ngx-cache/core": "^4.0.1",
"@nicky-lenaers/ngx-scroll-to": "^0.6.0",
"angular-calendar": "^0.24.1",
"angular-fontawesome": "^1.0.0",
"angular-star-rating": "^3.0.8",
"angular2-csv": "0.2.5",
"angular2-highcharts": "^0.5.5",
"angular2-jwt": "^0.2.3",
"angular2-moment": "^1.7.0",
"angular2-multiselect-dropdown": "2.5.0",
"angular2piwik": "^0.1.5-beta",
"body-parser": "^1.18.2",
"bootstrap": "4.0.0-beta.2",
"calendar-utils": "^0.1.2",
"core-js": "^2.5.1",
"express": "^4.16.2",
"file-saver": "^1.3.3",
"font-awesome": "^4.7.0",
"formdata-polyfill": "^3.0.10",
"grapesjs": "^0.14.10",
"grapesjs-preset-webpage": "^0.1.9",
"highcharts": "^6.0.2",
"howler": "^2.1.1",
"moment": "^2.19.1",
"moment-timezone": "^0.5.16",
"ng-click-outside": "^3.2.0",
"ng-recaptcha": "^3.0.5",
"ng2-charts": "^1.6.0",
"ng2-img-cropper": "^0.9.0",
"ng2-pdf-viewer": "^5.2.3",
"ngx-bootstrap": "^2.0.5",
"ngx-ckeditor": "^0.4.0",
"ngx-file-drop": "^2.0.2",
"ngx-google-places-autocomplete": "^2.0.1",
"ngx-infinite-scroll": "^0.8.2",
"ngx-perfect-scrollbar": "^5.3.1",
"ngx-toastr": "^6.5.0",
"robotjs": "^0.5.1",
"rxjs": "^5.5.2",
"socket.io": "^2.0.4",
"survey-angular": "^1.0.51",
"survey-jquery": "^1.0.51",
"surveyjs-editor": "^1.0.51",
"xlsx": "0.12.7",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.5.6",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "^2.5.52",
"@types/node": "^8.0.10",
"codelyzer": "~4.0.1",
"cpy-cli": "^1.0.1",
"http-server": "^0.10.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "^4.1.0",
"karma": "^2.0.4",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "^1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.3.2",
"reflect-metadata": "^0.1.10",
"ts-loader": "^2.3.7",
"ts-node": "~3.3.0",
"tslint": "~5.8.0",
"typescript": "~2.4.2"
}
}
So I installed nvm, nodejs 8.9.3, npm 5.7.1 on ubuntu 18.04. First problem I encountered was, that I could not install the packages from the package.json and had to update npm to the latest version with npm i npm@latest -g
.
The next run npm told me that there where about 33 vulnerabilities, some of them high, so that I still could not install the packages. After some npm update, npm audit fix, npm audit fix --force
I finally could install the packages.
Then I created a new project with npx ng new projectname
moved into that folder and did a npm run build
. That worked.
So first I would advise you to update to the current nodejs / npm version and then update the packages and try running that build again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With