Cannot read property NullLogger or dasherize of undefined
See original GitHub issueVersions
<!--
Output from: `ng --version`.
@angular/animations: 5.2.5
@angular/cli: 1.6.1
@angular/compiler-cli: 5.2.5
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.1
@schematics/angular: 0.1.17
typescript: 2.7.1
webpack-concat-plugin: 2.4.2
webpack-dev-server: 2.7.1
webpack: 3.10.0
node: 8.6.0
npm: 5.3.0
Windows10
Repro steps
using ng g c <new component name> get error first 'Cannot read property ‘NullLogger’ of undefined. and I have two versions of webpack, both the same (3.10.0) one under the CLI and one not. When I address that issue I get ERROR: cannot read property ‘dasherize’ of undefined.
Observed behavior
at SchematicEngine.createContext (C:\Code\Repos\Physician Links\Web\PhysicianLinks.Application\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\src\engine\engine.js:75:38)
at SchematicImpl.call (C:\Code\Repos\Physician Links\Web\PhysicianLinks.Application\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\src\engine\schematic.js:35:38)
at Promise (C:\Code\Repos\Physician Links\Web\PhysicianLinks.Application\node_modules\@angular\cli\tasks\schematic-run.js:73:23)
at Promise (<anonymous>)
at Class.run (C:\Code\Repos\Physician Links\Web\PhysicianLinks.Application\node_modules\@angular\cli\tasks\schematic-run.js:72:16)
at Class.run (C:\Code\Repos\Physician Links\Web\PhysicianLinks.Application\node_modules\@angular\cli\commands\generate.js:161:33)
at resolve (C:\Code\Repos\Physician Links\Web\PhysicianLinks.Application\node_modules\@angular\cli\ember-cli\lib\models\command.js:261:20)
at Promise (<anonymous>)
at Class.validateAndRun (C:\Code\Repos\Physician Links\Web\PhysicianLinks.Application\node_modules\@angular\cli\ember-cli\lib\models\command.js:240:12)
at Promise.resolve.then.then (C:\Code\Repos\Physician Links\Web\PhysicianLinks.Application\node_modules\@angular\cli\ember-cli\lib\cli\cli.js:140:24)
Desired behavior
would like to be able to create component using cli
Mention any other details that might be useful (optional)
Issue Analytics
- State:
- Created 6 years ago
- Comments:24
Top Results From Across the Web
Cannot read property 'dasherize' of undefined - Stack Overflow
In your package.json you can simply set inside your devDependencies "@angular-devkit/core":"0.4.6" ignoring other libraries like schematics ...
Read more >Cannot read property NullLogger or dasherize of undefined -
get error first 'Cannot read property 'NullLogger' of undefined. and I have two versions of webpack, both the same (3.10.0) one under the...
Read more >Cannot read property 'NullLogger' of undefined - Angular 5
Cannot read property ' NullLogger ' of undefined - Angular 5.
Read more >Cannot read property 'NullLogger' of undefined"-angular.js
Coding example for the question logger middleware throws "TypeError: Cannot read property 'NullLogger' of undefined"-angular.js.
Read more >Cann't read property 'NullLogger' of undefined - karthikeyavarma
Install latest Cli to solve this issue. Try below command. npm install --save @angular/cli@latest.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I fixed it by updating;
@ angular-devkit/core from “0.0.23” to “0.4.2”
@ angular-devkit/schematics from"0.0.42" to “0.4.2”
I solved it yesterday by running:
npm install --save @angular/cli@latest