Caching? Unable to build app


#1

Hi,

recently I made several changes to an already existing (and running) project. Some resulted in multiple errors of “unreachable code detected”. Okay, fixed the errors and it worked again.
Now, wheneve I open VS Code with this project again and start with ionic serve", I get the old errors. I go the file, save it, without making any chaanges, and the already served app starts as aspected.

Why?

The related bigger problem: when I want to build an .apk, the process stops with these errors and the following message

Error: Failed to transpile program
    at BuildError.Error (native)
    at new BuildError (C:\Users\...\Logbook\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
    at C:\Users\...\Logbook\node_modules\@ionic\app-scripts\dist\transpile.js:159:20
    at transpileWorker (C:\Users\...\Logbook\node_modules\@ionic\app-scripts\dist\transpile.js:107:12)
    at Object.transpile (C:\Users\...\Logbook\node_modules\@ionic\app-scripts\dist\transpile.js:64:12)
    at C:\Users\...\Logbook\node_modules\@ionic\app-scripts\dist\build.js:109:82

Someone with more profound insight to the framework who knows how to fix this? I really need help with this.

regards


#2

Does the compiler have any known problems with ‘swich/case’?
After replacing every occurence of ‘switch/case’ with ‘if’ constructs the compiler is happy, stops grumbling and gives me my requested .apk

wtf?