Ionic2 SideMenu Starter Typescript -- Error Cannot Find Module

Fresh new Ionic2 Typescript project started from the SideMenu template, i can’t seem to import any angular2 stuff from the page.

import {Page} from ‘ionic-angular’; //OK
import {Http} from ‘angular2/http’; //error: cannot find module
import {Component} from ‘angular2/core’; //error: cannot find module

How do i fix this? Thanks.

@angular/core

text text text

From getting-started.ts in the template, i’ve tried a lot of combinations…

import {Http} from ‘@angular2/http’; //error: cannot find module
import {Http} from ‘./…/…/node_modules/@angular2/http’; //error: cannot find module
import {Http} from ‘./…/…/…/node_modules/@angular2/http’; //error: cannot find module
import {Http} from ‘/node_modules/@angular2/http’; //error: cannot find module
import {Http} from ‘node_modules/@angular2/http’; //error: cannot find module

None of this work.
Even added “moduleResolution”: “node” in tsconfig.json didn’t work.
Any other ideas? Thanks in advance.

Please read that I wrote: @angular/core not @angular2/core

Good catch. Thank you.

I have a similar problem with a fresh sidemenu app with the Ionic 2.1.0 RC0 CLI. The default app uses @angular/core and still getting ‘missing’ errors. From app.component.ts:

import { Component, ViewChild } from ‘@angular/core’;

Build fails due to this. Any ideas?

I have a fresh sidemenu app generated via the cli and i can’t reproduce this. Maybe try “npm uninstall -g ionic” and reinstall ionic first?

Solved by uninstalling old node and installing node 6.x.x (and thereby updating npm as well). See here:

Thanks,
Marc