IOS App won't run. Wrong main.js File


#1

Hi we got a problem with our IOS App. When we run “npm run build --prod” the main.js file in the www folder looks like this (thats just the start of the file): webpackJsonp([0],{133:function(n,l){function e(n){return Promise.resolve().then(function(){throw new Error("Cannot find module '"+n+"'.")})}.
The old main.js file looked like this though: /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ };

The Problem is it’s not just compromised it’s slightly different.
When we run “cordova build ios” the main.js file in the ios platform folder looks the same.
With the main.js like this the App won’t run and when you look at the main.js in xcode it looks like this:

Our ionic info:

Our package.json:

{
    "name": "ionic-hello-world",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/common": "4.0.0",
        "@angular/compiler": "4.0.0",
        "@angular/compiler-cli": "4.0.0",
        "@angular/core": "4.0.0",
        "@angular/forms": "4.0.0",
        "@angular/http": "4.0.0",
        "@angular/platform-browser": "4.0.0",
        "@angular/platform-browser-dynamic": "4.0.0",
        "@angular/platform-server": "4.0.0",
        "@ionic/storage": "1.1.7",
        "cordova-android": "^6.2.3",
        "cordova-ios": "^4.5.4",
        "cordova-plugin-compat": "^1.2.0",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-file": "^4.3.3",
        "cordova-plugin-file-transfer": "^1.6.3",
        "cordova-plugin-http": "^1.2.0",
        "cordova-plugin-inappbrowser": "^1.7.2",
        "cordova-plugin-network-information": "^1.3.4",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.1",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova-sqlite-storage": "^2.0.4",
        "ionic-angular": "2.0.0-rc.4",
        "ionic-native": "2.2.11",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "rxjs": "5.0.0-beta.12",
        "zone.js": "0.6.26"
    },
    "devDependencies": {
        "@ionic/app-scripts": "^3.1.9",
        "typescript": "^2.2.1"
    },
    "cordovaPlugins": [
        "cordova-plugin-whitelist",
        "cordova-plugin-console",
        "cordova-plugin-statusbar",
        "cordova-plugin-device",
        "cordova-plugin-splashscreen",
        "ionic-plugin-keyboard"
    ],
    "cordovaPlatforms": [
        "ios",
        {
            "platform": "ios",
            "version": "",
            "locator": "ios"
        }
    ],
    "description": "hajoona2: An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-device": {},
            "cordova-plugin-file": {},
            "cordova-plugin-file-transfer": {},
            "cordova-plugin-http": {},
            "cordova-plugin-inappbrowser": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "cordova-sqlite-storage": {},
            "ionic-plugin-keyboard": {},
            "cordova-plugin-network-information": {}
        },
        "platforms": [
            "android",
            "ios"
        ]
    }
}