question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Ionic v4] ionic build --prod timeout

See original GitHub issue

Description: I’m getting a timeout every time I try to compile the app with the prod flag. The node daemon seems to be sleeping as well since there’s no cpu usage.

Steps to Reproduce: Run ionic build --prod --engine browser or ionic cordova build android --prod

Output:

 ionic build --prod --engine browser --verbose
  ionic:cli-utils Terminal info: { tty: true, ci: false } +0ms
  ionic:cli-utils CLI global options: { _: [ 'build' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, prod: true, engine: 'browser', project: null, '--': [] } +153ms
  ionic:cli-utils:lib:environment Environment open. +0ms
  ionic:cli-utils:lib:project Project type from config: ionic/angular 4 (angular) +0ms
  ionic:cli-utils Project name: undefined +10ms
  ionic:cli Context: { binPath: '/usr/lib/node_modules/ionic/bin/ionic', libPath: '/usr/lib/node_modules/ionic', execPath: '/mnt/c/Users/marce/Documents/Code/xCode/lingusocial-ionic-v4', version: '4.0.0' } +0ms
  ionic:cli-utils:lib:hooks Looking for ionic:build:before npm script. +0ms
  ionic:cli-utils:lib:project:angular:build Looking for ionic:build npm script. +0ms
> ng run app:build:production
Wed, 25 Jul 2018 18:34:12 GMT snapdragon:compiler initializing /mnt/c/Users/marce/Documents/Code/xCode/lingusocial-ionic-v4/node_modules/snapdragon/lib/compiler.js
Wed, 25 Jul 2018 18:34:12 GMT snapdragon:parser initializing /mnt/c/Users/marce/Documents/Code/xCode/lingusocial-ionic-v4/node_modules/snapdragon/lib/parser.js
Wed, 25 Jul 2018 18:34:12 GMT snapdragon:compiler initializing /mnt/c/Users/marce/Documents/Code/xCode/lingusocial-ionic-v4/node_modules/snapdragon/lib/compiler.js
Wed, 25 Jul 2018 18:34:12 GMT snapdragon:parser initializing /mnt/c/Users/marce/Documents/Code/xCode/lingusocial-ionic-v4/node_modules/snapdragon/lib/parser.js
Wed, 25 Jul 2018 18:34:12 GMT snapdragon:compiler initializing /mnt/c/Users/marce/Documents/Code/xCode/lingusocial-ionic-v4/node_modules/snapdragon/lib/compiler.js
Wed, 25 Jul 2018 18:34:12 GMT snapdragon:parser initializing /mnt/c/Users/marce/Documents/Code/xCode/lingusocial-ionic-v4/node_modules/snapdragon/lib/parser.js

My ionic info:


Ionic:

   ionic (Ionic CLI)          : 4.0.0 (/usr/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.0
   @angular-devkit/core       : 0.7.0-rc.2
   @angular-devkit/schematics : 0.7.0-rc.2
   @angular/cli               : 6.0.8
   @ionic/ng-toolkit          : 1.0.0
   @ionic/schematics-angular  : 1.0.0

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : none

System:

   NodeJS : v9.11.2 (/usr/bin/node)
   npm    : 6.2.0
   OS     : Linux 4.4

Environment:

   ANDROID_HOME : not set

Other Information:

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kinggolfcommented, Jul 25, 2018

Production build working for me: ionic cordova build android --device --prod --aot and ionic cordova run android --device --prod --aot Both OK.

Ionic:

ionic (Ionic CLI) : 4.0.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.0 @angular-devkit/core : 0.7.0-rc.1 @angular-devkit/schematics : 0.7.0-rc.1 @angular/cli : 6.0.8 @ionic/ng-toolkit : 1.0.0 @ionic/schematics-angular : 1.0.0

Cordova:

cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 7.0.0, ios 4.5.4

System:

Android SDK Tools : 26.1.1 ios-deploy : 1.9.2 NodeJS : v8.11.1 (/usr/local/bin/node) npm : 6.2.0 OS : macOS High Sierra Xcode : Xcode 9.4.1 Build version 9F2000

Environment:

ANDROID_HOME : /Users/golftocs/Library/Android/sdk

0reactions
imhoffdcommented, Aug 8, 2018

@marcelgoya Any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to build android in IONIC 6 - Stack Overflow
When I run ionic cordova build android –prod i get the error: Downloading https://services.gradle.org/distributions/gradle-7.1.1-all.zip ...
Read more >
Live Reload | Ionic Documentation
One option that can boost productivity when building Ionic apps is Live Reload (or live-reload). When active, Live Reload will reload the browser...
Read more >
The 9 Most Common Mistakes That Ionic Developers Make
The majority of developers using Ionic will want their app to run on iOS and Android. After adding the platforms ionic platform add...
Read more >
@ionic/app-scripts - npm
Scripts for Ionic Projects. Latest version: 3.2.4, last published: 4 years ago. Start using @ionic/app-scripts in your project by running ...
Read more >
Ionic 4 Build App – IOS, Android, Web – (Mac Tutorial)
Full mac tutorial on ionic build app. Ionic build IOS. Covering ionic cordova run android, ionic cordova build ios, and ionic build for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found