Problem upgrading to Ionic 2 RC 0

Hello Team,

First of all thanks for all your efforts for making to this milestone, with Ionic 2.0 our life have been easy.

Actually, after RC below are some issues I am facing

  1. After I update ionic still Ionic CLI showing beta version. After that I clear cache and uninstall still after that I am not able to work on it. After further debugging if I use /usrbin/ionic it works fine but not ionic alone.

  2. After this I use this command /usr/bin/ionic start helpionic2 --v2 to start new project. After running this project this /usr/bin/ionic serve I got below error

    [19:02:50] src/app/app.component.ts(1,27): error TS2307: Cannot find module ‘@angular/core’.
    [19:02:50] src/app/app.module.ts(1,26): error TS2307: Cannot find module ‘@angular/core’.
    [19:02:50] src/app/,40): error TS2307: Cannot find module ‘@angular/platform-browser-dynamic’.
    src/pages/about/about.ts(1,27): error TS2307: Cannot find module ‘@angular/core’.
    src/pages/contact/contact.ts(1,27): error TS2307: Cannot find module ‘@angular/core’.
    src/pages/home/home.ts(1,27): error TS2307: Cannot find module ‘@angular/core’.
    src/pages/tabs/tabs.ts(1,27): error TS2307: Cannot find module ‘@angular/core’.
    [19:02:50] typescript compiler ready in 2.96 s
    [19:02:50] bundle dev started …
    [19:02:51] Error: Could not resolve ‘@angular/platform-browser-dynamic’ from /home/gaurav/projects/ionic/helpionic2/.tmp/app/
    at Error (native)
    at /home/gaurav/projects/ionic/helpionic2/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:78:21
    at /home/gaurav/projects/ionic/helpionic2/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/browser-resolve/index.js:265:24
    at /home/gaurav/projects/ionic/helpionic2/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:46:14
    at process (/home/gaurav/projects/ionic/helpionic2/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:173:43)
    at ondir (/home/gaurav/projects/ionic/helpionic2/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:188:17)
    at load (/home/gaurav/projects/ionic/helpionic2/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:69:43)
    at onex (/home/gaurav/projects/ionic/helpionic2/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:92:31)
    at /home/gaurav/projects/ionic/helpionic2/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)

After this I manually installed npm install @angular/core @angular/platform-browser-dynamic Still after this I am got the below error in browser.

Uncaught Error: Can't resolve all parameters for provideLocationStrategy: (PlatformLocation, ?, Config).

Your system information:

Cordova CLI: 6.1.1
Gulp version: CLI version 1.2.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS
Node Version: v4.0.0

I really appreciate any help for this as soon possible its breaking my project which I am working from 1 month. :slight_smile:


Did you uninstall first i,e

npm uninstall -g ionic

before you did

npm install -g ionic

1 Like

may be it’s not the problem, but do you have npm 3? i don’t think so, Since you have node 4.0.


Copying your Project to a New Project
Ensure that you’re using npm version 3.x by running:
npm --version
If you are not running 3.x, the easiest way to update is to install the latest version of Node.js.

thanks @LAFONT I upgraded to npm 3 and its working now. But still I am using updated npm as /usr/bin/npm if I just use npm it use old npm version.

I have the same problem, and I’ve fix that removing node_modules folder, uninstalling ionic global module and re-install again, and update npm.


These steps worked for me -

uninstall ionic
update npm ( npm version 3.x.x)
install ionic

I am facing the same issue. I did an npm uninstall ionic -g first