Please help, error after upgrading from rc0 to rc2


#1

Hello, After upgrading and running the app I get a black screen and the following error in the console:

It looks like something went wrong in the build process, but it wont error at all.
Any help will be greatly appreciated !


#2

I would try to delete your node_modules folder and run another npm install. Make sure you have the current ionic build too.


#4

Hi, this is a clean install straight from git, What do you mean by check i have the current Ionic build?
I’m using the latest packages:


#5

What’s $ionic info return?


#6

c:\devl\work\wit_mobile>ionic info

Your system information:

ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.43
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed


#7

Try without the carets like ionic2-app-base.

  "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/storage": "1.1.6",
    "ionic-angular": "2.0.0-rc.2",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.21"
  },
  "devDependencies": {
    "@ionic/app-scripts": "0.0.43",
    "typescript": "2.0.6"
  }

#9

Hi, tried it, deleted my nodeModules, changed and installed, no change…,


#10

I have this same issue here.


#11

Hi

See:

add declarations.d.ts to src/

https://github.com/driftyco/ionic2-app-base/blob/master/src/declarations.d.ts


#12

Hi, I already had this file, it came with ionic seed.


#13

Check you’re on latest CLI:

npm install ionic@latest -g

Then build using ‘ionic build browser’ as ionic serve sometime doesn’t flag build errors. If that works, your good. Notice that originally you had the old angular-cli installed but presume thats now updated (run npm install just to be sure)


#14

I had this exact issue with projects freshly-generated from the examples, and posted here. It seems to be resolved, now - my solution was to run:

npm uninstall -g ionic cordova

I then cleared the npm-cache directory (same location as the npm directory, that’s Roaming appdata for me on windows) and my temporary directory before reinstalling both and running ionic start again. I don’t know how an existing project will go down, but I think it should just work.

Edit: It was working, but only briefly - seemingly randomly the same issue has happened.


#15

I finally got a solution to this problem after reading this https://github.com/driftyco/ionic-app-scripts

  1. I changed the scripts in my package.json file to look like this:

    "scripts": {
       "build": "ionic-app-scripts build",
       "watch": "ionic-app-scripts watch"
    },
    
  2. I ran npm run build and then ionic serve

And all errors gone


#16

thants, I have the same problem. and fied it by this way!!