Unable to read property "makeCurrent" from undefined in angular mobile

I did on angular mobile, https://github.com/angular/mobile-toolkit/blob/master/guides/cli-setup.md

Node version v4.4.3 NPM version 2.15.1

The problem is that when you type $ ng serve , the following error occurs.

 Cannot read property 'makeCurrent' of undefined TypeError: Cannot read property 'makeCurrent' of undefined at Object.<anonymous> (/Users/user/Documents/Projects/PWA/hello-mobile/node_modules/angular2-universal/dist/node/node.js:7:35) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/Users/user/Documents/Projects/PWA/hello-mobile/node_modules/angular2-universal/dist/node/index.js:5:17) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/Users/user/Documents/Projects/PWA/hello-mobile/node_modules/angular2-broccoli-prerender/dist/prerender.js:8:28) at Module._compile (module.js:409:26) 
+5
source share
2 answers

Well, finally it works. Update the .json package in the root folder as shown below.

 "angular2-broccoli-prerender": "0.11.3", "angular2-universal": "0.104.4", 

Also add

 "child-process-promise": "^2.0.2", "optimist": "^0.6.1" 

then

 > npm update 

It will make it work again

+7
source

I managed to get it working by simply updating the two packages mentioned by Aswin.

As recent / working versions were:

 "angular2-broccoli-prerender": "0.11.5", "angular2-universal":"0.104.5", 
+1
source

All Articles