Ionic 2.0 tabs project error generating main.js.map?

Is there any git repo I can look at?
To be honest, we’re getting to the point we I’m running out of things to look for off the top of my head.

@mhartington my git repo is private. i think the problem is minification.
is there a way to use the minified js file when doing ionic serve ? I’d love to check from the browser.

I actually got an idea to test out. give me an hour, i’ll come back.

Since upgrading to 2.0.0 final I have the same problem. White screen only on Android when running:
ionic run android --prod.

Android Device Monitor shows this:
01-27 11:09:20.715: I/chromium(3354): [INFO:CONSOLE(7)] “Uncaught Error: Cannot find module “./app.module.ngfactory””, source: file:///android_asset/www/build/main.js (7)

ionic run android works, but is slow.

did you try ionic run android --aot <---- this is faster since it uses AoT.

No, but you can run the www folder different ways.

But like I stated before this wont tell you anything different .

@justjoe please list your package.json version, and @ozexpert that is not recommended to do.
The issue must be solved by other means.

Yeah i know, im just asking whether he has the minification problem. @mhartington
I’m copying over the min file manually to use with ionic serve to test out why that js is broken.

Hmm… actually this is what i did. I saved the main.js when running with --prod. and then changed index.html to use main.min.js and after running ionic serve i copied over the main.min.js file to /www/build/ folder to test out.

This works to test out the minification. I ran through the browser…

and …

it worked.

so minification is not the problem (i think). Is minification only the difference between --prod and --aot ?

I ran:
ionic run android --aot
and got exactly the same result as:
ionic run android --prod
white screen only and same error as above.

Here is my package.json:

{
  "name": "my-reddits",
  "author": "asdf",
  "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": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic/storage": "1.1.7",
    "angularfire2": "^2.0.0-beta.7",
    "firebase": "^3.6.5",
    "ionic-angular": "2.0.0",
    "ionic-native": "2.2.11",
    "ionicons": "3.0.0",
    "node-uuid": "^1.4.7",
    "rxjs": "^5.0.0-beta.12",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.0.0",
    "typescript": "2.1.4"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "ionic-plugin-keyboard",
    "cordova-plugin-splashscreen"
  ],
  "cordovaPlatforms": [],
  "description": "My Reddits"
}

@justjoe you’re issue is this.

 "typescript": "2.1.4"

TS 2.1 is not compatible with ionic at the moment.
We lock it down in the package.json for such a reason.
Please change it to

"typescript": "2.0.9"

Delete node_modules, and run npm install again.

Thank you, that fixed my problem.

BTW, hello from down the road in Oconomowoc! Thank you and the team for what you are doing!

1 Like

@mhartington hi again. just one final question: what’s the different between --aot and --prod? is the minification the only difference?

Yes, the only other addition between the two is uglify.

@mhartington found the problem. I tested only js file (main.js). the minified css was the problem and caused white screen. Don’t know whether it’s related to this again:

I have over 20+ variables in $colors