I've done according to angular mobile, https://github.com/angular/mobile-toolkit/blob/master/guides/cli-setup.md
Node version v4.4.3
NPM version 2.15.1
Problem is when I type $ ng serve
encounter following error.
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)
Ok finally got it working. Update package.json in your root folder like 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
This will make it working again
I was able to get it working by just updating the two packages mentioned by Aswin.
The latest/working versions at the time were:
"angular2-broccoli-prerender": "0.11.5",
"angular2-universal":"0.104.5",
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With