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

🐞 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

About this issue

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

Most upvoted comments

Team, any update on this issue?

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

Does anybody fix this issue?

Hi, I have the same issue, i solved it with this version ng add @ng-toolkit/universal@8.0.3