Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.

TypeError: Cannot read property 'moduleType' of undefinded when build --prod #1528

Open

Description

@prakasa-tkpd

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/

Short description of the problem:

Error when exec build --prod

What behavior are you expecting?

Running normal

Steps to reproduce:

  1. ionic-app-scripts build --prod
  2. open apps
  3. error TypeError: Cannot read property 'moduleType' of undefinded

main.ts

const debug = require('debug')('devetek:hompes');

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from '@app/app.module';
import { enableProdMode } from '@angular/core';
import { NODE_ENV } from '@constants/index';

if (NODE_ENV) {
  enableProdMode();
}

document.addEventListener('DOMContentLoaded', () => {
  platformBrowserDynamic().bootstrapModule(AppModule)
    .catch(err => debug(err));
});

Which @ionic/app-scripts version are you using?
npm run-script build --prod

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Its running well when exec ionic-app-scripts serve

error on build prod:

Cannot read property 'moduleType' of undefined
TypeError: Cannot read property 'moduleType' of undefined
    at http://localhost/build/vendor.js:1:38866
    at t.invoke (http://localhost/build/polyfills.js:3:14976)
    at Object.onInvoke (http://localhost/build/vendor.js:1:34734)
    at t.invoke (http://localhost/build/polyfills.js:3:14916)
    at r.run (http://localhost/build/polyfills.js:3:10143)
    at t.run (http://localhost/build/vendor.js:1:35456)
    at t.bootstrapModuleFactory (http://localhost/build/vendor.js:1:38797)
    at HTMLDocument.<anonymous> (http://localhost/build/main.js:1:373)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions