I have a issue with Angular 2. When i want to start server it get this:
$ ng serve
Cannot read property 'config' of null
TypeError: Cannot read property 'config' of null
at Class.run (C:\Users\Damien\Desktop\application\node_modules\@angul ar\cli\tasks\serve.js:22:63)
at check_port_1.checkPort.then.port (C:\Users\Damien\Desktop\application\node_modules\@angular\cli\commands\serve.js:103:26)
at process._tickCallback (internal/process/next_tick.js:103:7)
I reinstalled CLI and nothing else is working. I could be something with json file?
config
. Let's call itFoo
, so it might look like this:class Foo { public config: any; };
Then somewhere else you're trying to get the value ofconfig
, maybe like this:let f = getFoo(); let c = f.config;
The problem isf
isnull
. – Faithfaithful