When I try to build my project with either ionic cordova run android or ionic serve -c, I run into this error, which does not really help me to pinpoint the problem. I was not able to find any information with this:
D:\APPS\*****\*****>ionic serve -c --verbose
[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: 'D:\\APPS\\*****\\******', local: false, binPath:
'C:\\Users\\*****\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath:
'C:\\Users\\*****\\AppData\\Roaming\\npm\\node_modules\\ionic\\dist\\index.js' }
[DEBUG] New daemon pid: 12084
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --consolelogs
--nobrowser - Ctrl+C to cancel
[20:03:59] watch started ...
[20:03:59] build dev started ...
[20:03:59] clean started ...
[20:03:59] clean finished in 3 ms
[20:03:59] copy started ...
[20:04:00] deeplinks started ...
Error: Debug Failure.
at new BuildError (D:\APPS\*****\*****\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
at D:\APPS\*****\*****\node_modules\@ionic\app-scripts\dist\deep-linking.js:57:21
at <anonymous>
[DEBUG] Error: Debug Failure.
at new BuildError (D:\APPS\*****\*****\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
at D:\APPS\*****\*****\node_modules\@ionic\app-scripts\dist\deep-linking.js:57:21
at <anonymous>
[20:04:00] copy finished in 561 m
I tried updating the module app-scripts with npm install @ionic/app-scripts, but the same error happens again. I’m out of ideas… anyone knows how to tackle this one?
Yes, I’m aware of that, I actually only meant to post it because the output seems to tell more than the output from the 1st message. Would you have any idea what I can do about this?
So this has started happening to me too. I cannot get anything to build now, at all. Code that built yesterday against the same package.json entries now does not. I have tried leaving the build running for well over an hour, and watched node consume ~12GB of RAM, drop to 1GB, back up to 12GB, over and over and never ever finish. I cannot build using Ionic Pro. I cannot build locally.
SOMETHING in a dependency got updated using a carat semver spec, and it has broken AOT, Typescript, and Webpack. I don’t think it is ionic-app-scripts that is the culprit; I think it is some dependency somewhere.
I really don’t know what to do.
EDIT: Forgot to add, this is trying to do a --prod build: ionic-app-scripts build --prod --release. I am on latest app scripts and ionic-angular, Angular 5.2.6, RxJS 5.5.5, Zone.js 0.8.18. This is for Ionic 3.
For anyone else who might be running into an out of memory error yesterday or today (April 21, 2018), if you are using Firebase, they just published a version that has a massive memory leak. Read all about it here:
I started to go through my project again and noticed that one HTML document and its .ts file were completely altered. Instead of the HTML / .ts code, both files had been replaced with HTML data from github (?!?). I have absolutely no clue how this has happened. When I put my project’s contents back in those files, I was able to run the build successfully. The memory usage never went above 1.5 GB during that.
How this happened is a complete mystery to me. I remember only pushing my code to github before I started to create a test build… I did not download or replace any files directly into my project folder.
Someone might have a better idea about this?
Anyway, I recommend doing the same, just in case you come across a similar error that points to “JavaScript heap out of memory”.