Error in Ionic Cordova Build prod: Module "." not found - Requires Typescript version >3

After updating my ionic project and all dependencies, I encountered an error when trying to build a --prod android apk:

Uncaught Error: Cannot find module "."
at vendor.js:1
at vendor.js:1
at Object.<anonymous> (vendor.js:1)
at e (vendor.js:1)
at Object.<anonymous> (main.js:1)
at e (vendor.js:1)
at window.webpackJsonp (vendor.js:1)
at main.js:1
vendor.js:1 Ionic Native: deviceready event fired after 57 ms
assets/icon/favicon.ico:1 Failed to load resource: net::ERR_FILE_NOT_FOUND

I have researched extensively and the problem appears to be related to the TypeScript version (>3). However, the only solution mentioned in older posts from 2018 was to downgrade TypeScript to version 2.6. Unfortunately, this is not feasible for me as I need to use Angular >= 7 for Firebase integration.

Is there a proper solution available to resolve this issue?

Ionic Info:

Ionic:

   Ionic CLI          : 5.4.9 (C:\Users\Kumaro\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.5
   @ionic/app-scripts : 3.2.2

Cordova:

   Cordova CLI       : 9.0.0 (<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8be8e4f9efe4fdeaa6e7e2e9cbb2a5bba5ba">[email protected]</a>)
   Cordova Platforms : android 7.1.4
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 15 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.3.0

System:

   Android SDK Tools : 26.1.1 (C:\Program Files\AndroidSDK)
   NodeJS            : v12.13.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.12.0
   OS                : Windows 7

Package.js:

{
    "name": "Name",
    "version": "1.0.0",
    "author": "Name",
    "homepage": "www.blabla.de",
    "private": true,
    // Other package details...

Any assistance would be greatly appreciated.

Answer №1

Start by ensuring the correct tags are set on your question, which I have done for you - specifically Ionic 3

Your recent update is inaccurate. Please note that Ionic 3 does not support Angular 7 and RxJS 6 +

It is important to refer to the official documentation to update to the appropriate versions.

Official Ionic 3 app: https://github.com/ionic-team/ionic-conference-app/blob/v3/package.json#L16

OR Transitioning from Ionic 3.0 to Ionic 4.0: https://ionicframework.com/docs/building/migration

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Verify the accuracy of each object in an array by comparing it to an enum and confirming its validity

I am trying to determine how many matches/true values there are based on the values of all objects in an array, compared to an enums value. My array of objects is structured like this: const jobs = [{ description, title, }... ] In addit ...

Exploring the possibilities of utilizing JavaScript within TypeScript

My dynamic javascript object holds all the resources (translation strings) for my app. Here's how it is structured: var ResourceManager = (function () { function ResourceManager() { var currentLanguage = $('#activeLanguage').htm ...

Inquiry regarding the return value of 'async-lock' in nodejs

I am utilizing the async-lock module in my typescript project to handle concurrency. However, I am encountering difficulties with returning the result within lock.acquire(...) {...}. Any guidance on how to resolve this issue would be greatly appreciated. ...

Display embedded ng-template in Angular 6

I've got a template set up like this <ng-template #parent> <ng-template #child1> child 1 </ng-template> <ng-template #child2> child 2 </ng-template> </ng-template> Anyone know how t ...

Displaying information stored in a database as notifications in the notification icon within the HTML/PHP header

Within my MySQL database, there exists a table named order_detail. This table is populated with values from my android app. I am looking to display the order_id as a notification in my admin panel, which is built using HTML/PHP. The attributes of the orde ...

Tips for minimizing or eliminating padding in Jetpack Compose's OutlinedButton

Is there a way to reduce the padding in OutlinedButton for the text "apple"? I've tried contentPadding, modifier padding, and other methods but can't seem to decrease the padding. Any suggestions on how to achieve this without specifying an absol ...

Creating a component with @input for unit tests in Angular can be achieved through the following steps

I'm encountering issues while attempting to create a testing component with an @input. The component utilizes properties from the feedback model, and although I imported them into the test file, errors are being displayed. Can anyone offer assistance? ...

Identify all the CHECKBOX elements that are visible and not concealed

On my page, I have various checkboxes - some with hidden=true and others with hidden=false attributes. Despite trying to use a selector or jQuery to locate checkboxes with the hidden property, I am still facing some challenges. My goal is to differentiate ...

Creating custom web components with routing in Angular 6

Is it possible to create an Angular WebComponent or Custom Element with routing modules in Angular 6? I have successfully created a web component with atomic components and now I want to expand it to have multiple screens using the routing module. Here ar ...

Ways to set a default value for a union type parameter without encountering the error "could be instantiated with a different subtype of constraint"

After referring to my recent inquiry... Can a default value be specified for valueProp in this scenario? type ValueType = 'value' | 'defaultValue' type Props<T extends ValueType> = Record<T, string> ...

Tips for fixing the error message of "Cannot access value property of null"

I am facing an issue in my Angular application where I need to conditionally display a div based on certain criteria. Initially, when the page loads, there are no console errors and the div is not shown due to the ngIf condition being false. However, upo ...

Angular: facing difficulty displaying static html pages on server, although they render correctly when run locally

Within my Angular project, I have stored a few static html files (specifically sampleText.html) in the src/assets/html folder. In one of my components, I am attempting to fetch and display this file. The following code is being used for this purpose. Every ...

What is the best way to send information from an application to a webpage in real time?

I'm currently working on integrating a card.io app for scanning credit cards. https://github.com/card-io/card.io-Android-source Once the card is scanned in the app, there is a Send button that allows you to send the card number wherever needed. pu ...

Discovering identical objects in two arrays in Angular using TypeScript is a breeze

I've hit a roadblock with a TypeScript problem in my Angular service. I have an array of ingredients: private ingredients: Ingredient[] = [ new Ingredient('farina', 500), new Ingredient('burro', 80), new Ingredient('ucc ...

What is the best way to extract data from multiple FormControl instances using RxJS in Angular?

I am currently subscribed to three FormControl instances named filter1, filter2, and filter3. My goal is to fetch the values of all three whenever any one of them changes. I initially attempted to achieve this using combineLatest, but found that it only em ...

Experiencing difficulties with managing immutable state within ngrx framework

Hi there, I'm currently exploring ngrx and trying to implement immutable state management. However, I've run into some issues with getting it to work properly. Below is the reducer I am working with: https://stackblitz.com/edit/brewbrut?file=src ...

"Utilizing the same generic in two interface properties in Typescript necessitates the use of the

I have created an interface as follows: interface I<T>{ foo: T arr: T[] } After defining the interface, I have implemented an identity function using it: const fn = <T>({foo, arr}: I<T>) => ({foo, arr}) When calling this function l ...

Make sure the static variable is set up prior to injecting the provider

In our Angular6 application, we utilize a globalcontextServiceFactory to initialize the application before rendering views. This process involves subscribing to get configuration from a back-end endpoint and then using forkJoin to retrieve environment app ...

The PrimeNG pie chart will sporadically appear and adjust its display when the resolution changes

I recently encountered an issue with a primeng pie chart that I am using, which pulls dynamic data from the back-end. Previously, when using static data, the pie chart functioned perfectly. However, after integrating dynamic data, the chart now seems to di ...

invoking a method within an express route to retrieve and utilize middleware functions

For my project, I am working on a custom function to handle API request validation. Here is how it looks: export function validateBody(schema: string): (req: ExpressRequest, res: ExpressResponse, next: ExpressNextFunction) => void { return function ...