question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular 1.4.9 : Cannot read property 'NullLogger' of undefined

See original GitHub issue

Angular/cli 4 - 1.4.9

Output from: ng --version. @angular/cli: 1.4.9 node: 8.9.4 os: win32 x64 Windows 10 - ver 1709(16299)

Repro steps

C:\Users\Owner\AppData\Roaming\npm\ng -> C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\bin\ng

uglifyjs-webpack-plugin@0.4.6 postinstall C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\node_modules\uglifyjs-webpack-plugin node lib/post_install.js

npm WARN @angular-devkit/schematics@0.0.51 requires a peer of @angular-devkit/core@0.0.28 but none is installed. You must install peer dependencies yourself. npm WARN @schematics/angular@0.0.49 requires a peer of @angular-devkit/schematics@0.0.34 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules@angular\cli\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

  • @angular/cli@1.4.9 added 59 packages, removed 351 packages, updated 29 packages and moved 10 packages in 80.908s
  • Step 2 $ ng new ang4test

Cannot read property ‘NullLogger’ of undefined TypeError: Cannot read property ‘NullLogger’ of undefined at SchematicEngine.createContext (C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\schematics\src\engine\engine.js:64:39) at SchematicImpl.call (C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\schematics\src\engine\schematic.js:35:38) at Promise (C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\tasks\schematic-run.js:72:23) at new Promise (<anonymous>) at Class.run (C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\tasks\schematic-run.js:71:16) at Class.run (C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\tasks\init.js:71:33) at Class.run (C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\commands\new.js:133:25) at resolve (C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\ember-cli\lib\models\command.js:261:20) at new Promise (<anonymous>) at Class.validateAndRun (C:\Users\Owner\AppData\Roaming\npm\node_modules@angular\cli\ember-cli\lib\models\command.js:240:12)

  • Step 3

Observed behavior

All outputs shown above

Desired behavior

I expected new project to be made.

Mention any other details that might be useful (optional)

I’ve tried to install before many times. Installed and uninstalled, cleaned cache, but failed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

31reactions
srinivas444commented, Mar 29, 2018

I also faced the same issue but resolved by following this steps they will help you.

npm uninstall -g @angular/cli npm uninstall --save-dev @angular/cli npm cache clean npm install -g @angular/cli@latest npm install --save-dev @angular/cli@latest

it worked for me.

30reactions
albertotorresfoltyncommented, Jan 31, 2018

definitely angular sucks… sorry for posting this… but this can’t happen in two platforms today in 2018…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not read property 'NullLogger' of ... - Stack Overflow
Today, sudeenly I start getting this error "Cannot read property 'NullLogger' of undefined" while trying to add ...
Read more >
Cannot read property 'NullLogger' of undefined - Angular 5
Cannot read property ' NullLogger' of undefined - Angular 5.
Read more >
cannot read properties of undefined angular - You.com
The problem is that as an Input variable, the reminders object is initially undefined until angular has finished initializing the component. See this...
Read more >
Can not read property 'NullLogger' of undefined (angular/cli ...
Today, sudeenly I start getting this error "Cannot read property 'NullLogger' of undefined" while trying to add a component ( ng g c...
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found