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.

[@ng-toolkit/universal] ERROR: newTree.optimize is not a function

See original GitHub issue

🐞 bug report

Error while installing @ ng-toolkit/universal package

ajanuw@DESKTOP-HBG750D /d/ajanuw/ng9
λ ng add @ng-toolkit/universal
Installing packages for tooling via npm.
Installed packages for tooling via npm.
ERROR: newTree.optimize is not a function
ERROR: If you think that this error shouldn't occur, please fill up bug report here: https://github.com/maciejtreder/ng-toolkit/issues/new
INFO: stacktrace has been sent to tracking system.
Nothing to be done.
ajanuw@DESKTOP-HBG750D /d/ajanuw/ng9
λ ng v

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 9.0.3
Node: 12.13.1
OS: win32 x64

Angular: 9.0.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.3
@angular-devkit/build-angular     0.900.3
@angular-devkit/build-optimizer   0.900.3
@angular-devkit/build-webpack     0.900.3
@angular-devkit/core              9.0.3
@angular-devkit/schematics        9.0.3
@angular/cli                      9.0.3
@ngtools/webpack                  9.0.3
@schematics/angular               9.0.3
@schematics/update                0.900.3
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:15

github_iconTop GitHub Comments

17reactions
geetika-kathuriacommented, Aug 20, 2020

Team, any update on this issue?

15reactions
Akshay6396commented, Jun 12, 2020

Hey Guys,

If you are using angular 9 then, Kindly run npm i @schematics/angular@9.1.0 npm i @angular-devkit/schematics@9.1.0

then ng add @ng-toolkit/universal

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular error: newTree.optimize is not a function
After I upgraded to angular 9, I had 2 packages that were both still at version 0.6.8, They were: @schematics/angular@9.1.0 ...
Read more >
Facing Issue with Angular Universal Implemetation - Reddit
ng add @ng-toolkit/universal. ERROR: newTree.optimize is not a function. When using: ng add @nguniversal/express-engine.
Read more >
Developers - ng add @ng-toolkit/universal give ERROR
ng add @ng-toolkit/universal give ERROR: newTree.optimize is not a function.
Read more >
Angular Universal/Ng-Toolkit/Universal Throws Error When ...
Error : newTree.optimize is not a function . After trying to import the cool extension @ngtoolkit/universal to angular the angular cli printed the....
Read more >
@ng-toolkit/universal - npm
Adds Angular Universal support for any Angular CLI project. Latest version: 8.1.0, last published: 3 years ago.
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