Could not run app after upgrading ionic 2 to beta 4


#1

I just upgraded my ionic and downloaded a sample app using “ionic start cutePuppyPics --v2”, when i run it things in it are not viewed properly i could able to see a single page in browser. and if i run any ionic 2 project all data comes to a single page

okeshs-Mac-mini:new yokesh$ ionic serve
WARN: ionic.config.js has been deprecated, you can remove it.

Running ‘serve:before’ gulp task before serve
[13:20:36] Starting ‘clean’…
[13:20:36] Finished ‘clean’ after 9.96 ms
[13:20:36] Starting ‘watch’…
[13:20:36] Starting ‘sass’…
[13:20:36] Starting ‘html’…
[13:20:36] Starting ‘fonts’…
[13:20:36] Starting ‘scripts’…
[13:20:37] Finished ‘scripts’ after 66 ms
[13:20:37] Finished ‘html’ after 75 ms
node_modules/ionic-angular/components.core.scss
Error: Import directives may not be used within control directives or mixins.
on line 34 of node_modules/ionic-angular/components.core.scss

@import “fonts/ionicons”;
–^

[13:20:37] Finished ‘sass’ after 109 ms
[13:20:37] Finished ‘fonts’ after 85 ms
7.3 MB bytes written (14.37 seconds)
[13:20:55] Finished ‘watch’ after 18 s
[13:20:55] Starting ‘serve:before’…
[13:20:55] Finished ‘serve:before’ after 12 μs

WARN: ionic.config.js has been deprecated, you can remove it.
Running live reload server: http://192.168.1.3:35729
Watching: www//*, !www/lib//*
√ Running dev server: http://192.168.1.3:8100
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit

ionic $

system information:

Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v4.4.2
Xcode version: Not installed


#2

I have faced this issue, You can navigate to node_modules/ionic-angular/components.core.scss and delete this import.

This approach works well for me.


#3

If u still have problem:

Install new ionic 2 version with: ionic start … --v2
Copy your “app” folder into this new one.

Profit :slight_smile:


#4

npm install gulp-sass@2.2.0
npm install node-sass@3.4.2