# Module build failed: SyntaxError. cant use NavController

**URL:** <https://forum.ionicframework.com/t/module-build-failed-syntaxerror-cant-use-navcontroller/45067>\
**Category:** ionic-v3\
**Created:** [February 29, 2016, 5:26pm UTC](https://forum.ionicframework.com/t/module-build-failed-syntaxerror-cant-use-navcontroller/45067 "2016-02-29T17:26:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oeem1011](https://avatars.discourse-cdn.com/v4/letter/o/6bbea6/32.png) [@oeem1011](https://forum.ionicframework.com/u/oeem1011)\
**Post date:** [February 29, 2016, 5:26pm UTC](https://forum.ionicframework.com/t/module-build-failed-syntaxerror-cant-use-navcontroller/45067/1 "2016-02-29T17:26:08Z")

</div>

Hello, i installed ionic 2 last week and i test a few things. Everything was okey.  
Today i updated my npm and ionic2 and now i get an error:

i tells me that “nav: NavController” is a syntaxerror.

I dont know what happend. Can someone help.

ERROR in ./app/pages/home/home.js  
Module build failed: SyntaxError: D:/Emre/Ionic/TestProject/tarihden/app/pages/h  
ome/home.js: Unexpected token (13:20)  
11 | export class HomePage {  
12 |

> 13 | constructor (nav: NavController ) {  
> | ^  
> 14 |  
> 15 | this.nav = nav;  
> 16 | this.myData = “Hallo Emre”;  
> at Parser.pp.raise (D:\Emre\Ionic\TestProject\tarihden\node\_modules\babel-co  
> re\node\_modules\babylon\index.js:1425:13)  
> at Parser.pp.unexpected (D:\Emre\Ionic\TestProject\tarihden\node\_modules\bab  
> el-core\node\_modules\babylon\index.js:2905:8)  
> ``

---

<div class="post-metadata">

**Author:** ![tixgetapp](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@tixgetapp](https://forum.ionicframework.com/u/tixgetapp)\
**Post date:** [March 4, 2016, 3:30am UTC](https://forum.ionicframework.com/t/module-build-failed-syntaxerror-cant-use-navcontroller/45067/2 "2016-03-04T03:30:30Z")

</div>

I’m getting the exact same problem as the OP. I just created a new project and added a the constructor with nav param to a single tab and it won’t compile.

---

<div class="post-metadata">

**Author:** ![Thomas2017](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@Thomas2017](https://forum.ionicframework.com/u/Thomas2017)\
**Post date:** [March 4, 2016, 5:05pm UTC](https://forum.ionicframework.com/t/module-build-failed-syntaxerror-cant-use-navcontroller/45067/3 "2016-03-04T17:05:18Z")

</div>

I had the exact same problem. I went to the sidemen template to see how the navigation works and found this

export class Page1 {  
static get parameters(){  
return [[NavController],[Http]];  
}  
constructor(nav, http) {  
this.nav = nav;  
this.http = http;

Now my navigation works again

---

<div class="post-metadata">

**Author:** ![luchillo17](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/luchillo17/32/78209_2.png) [@luchillo17](https://forum.ionicframework.com/u/luchillo17)\
**Post date:** [March 4, 2016, 5:06pm UTC](https://forum.ionicframework.com/t/module-build-failed-syntaxerror-cant-use-navcontroller/45067/4 "2016-03-04T17:06:49Z")

</div>

That’s the difference between the TS version and the JS one, the Ionic 2 docs are made for the TS version soo…
