Build failed :segmentation fault


#1

Short description of the problem:

I’ve tried to build my app on now, heroku… but it stops at :
ionic-app-scripts build

[04:50:15] ionic-app-scripts 1.3.7
[04:50:15] build dev started …
[04:50:15] clean started …
[04:50:15] clean finished in 1 ms
[04:50:15] copy started …
[04:50:15] transpile started …
[04:50:21] transpile finished in 5.98 s
[04:50:21] preprocess started …
[04:50:21] deeplinks started …
[04:50:21] deeplinks finished in 31 ms
[04:50:21] preprocess finished in 32 ms
[04:50:21] webpack started …
[04:50:21] copy finished in 6.49 s
[04:50:40] webpack finished in 19.40 s
[04:50:40] sass started …

Segmentation fault (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 139

package.json:
"scripts": { "clean": "ionic-app-scripts clean", "start": "node server.js", "build": "ionic-app-scripts build", "lint": "ionic-app-scripts lint", "ionic:build": "ionic-app-scripts build", "ionic:serve": "ionic-app-scripts serve" }, "dependencies": { "@agm/core": "^1.0.0-beta.0", "@angular/animations": "4.1.3", "@angular/common": "4.1.3", "@angular/compiler": "4.1.3", "@angular/compiler-cli": "4.1.3", "@angular/core": "4.1.3", "@angular/forms": "4.1.3", "@angular/http": "4.1.3", "@angular/platform-browser": "4.1.3", "@angular/platform-browser-dynamic": "4.1.3", "@ionic-native/core": "^3.12.1", "@ionic-native/splash-screen": "^3.12.1", "@ionic-native/status-bar": "^3.12.1", "@ionic/storage": "2.0.1", "@types/googlemaps": "^3.26.14", "bcrypt-nodejs": "0.0.3", "body-parser": "^1.17.2", "core-js": "^2.4.1", "ejs": "^2.5.6", "express": "^4.15.3", "ionic-angular": "3.4.2", "ionicons": "3.0.0", "mongoose": "^4.10.8", "node-sass": "^4.5.3", "passport": "^0.3.2", "passport-local": "^1.0.0", "path": "^0.12.7", "rxjs": "5.4.0", "sw-toolbox": "3.6.0", "zone.js": "0.8.12" },

Which @ionic/app-scripts version are you using?
@ionic/app-scripts: “1.3.8”,
also i tried
@ionic/app-scripts: “1.3.7”

my ionic info is:
Ionic Framework : ionic-angular 3.4.2

System:

Node       : v7.10.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 5.0.3

have any ideas?


#2

What does that mean?


#4

it means that i can not deploy my app because the build command is unsuccessful


#5

That is not what I asked. How is this related to “now” and Heroku? How and where are you builing exactly?


#6

im building a note.js mongo ionic app a MEAN but with ionic instead of angular 2
The Now and Heroku is where i tried to deploy and it gives me: Segmentation fault (core dumped)…


#7

Ionic apps are normally developed and build locally, then deployed via mobile app stores or copying the build files to a server.


#8

ok but if i need a server part with what should i work
ionic +… what
can u give me an example, maybe a github one, that works with a server side?


#9

That is totally up to you - you can use node and MongoDB if you want. The backend app only has to offer an API that can be consumed by the app. How you build the API is up to you.


#10

is only one way how to build the app and is the one that gives me that error …


#11

So how exactly do you build you app? You describe that you build “on now, heroku” which makes no sense. Normally you build the app by running “ionic cordova build …” in the command line via Ionic CLI. Normally you also first run the app using ionic serve to see if it works in the browser.


#12

ok finally ionic serve is for ionic part . in ionic 3 u build whit ionic package build android but when i deploy it u introduce a script in package.json thats is i detailed it upper part so in it has to contain two essential scripts :
"start": "node server.js", is for server part it s run last "build": "ionic-app-scripts build", ist for ionic part its run first
that s how u do it with node js(server side ) and ionic (client side)
the hole app contain a file server js and the hole app is deployed on the server side and accessed via a browser


#13

I think you mixed your frontend/client (Ionic) and backend/server (nodejs) apps into one project for no reason.


#14

u know just dont worry about it!