angular-cli: `ng new` error 'Tree type is not supported

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

This may be a duplicate of #11683, but I’m unable to ng new due to some global config problem and the error isn’t helpful in helping me resolve it.

Command (mark with an x)

- [X] new

Versions

Node: 8.10.0
OS: linux x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    <error>
@angular-devkit/core         <error>
@angular-devkit/schematics   0.7.1
@schematics/angular          <error>
@schematics/update           <error>
rxjs                         <error>

Repro steps

Not sure, happens every time I try to ng new on my machine. I have removed all globally installed yarn packages and deleting my global node_modules folder (verified by failing to run ng at all), then reinstalling them without success.

The log given by the failure

$ ng new my-app Tree type is not supported.

Desired functionality

Scaffold me out an Angular app

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 22 (4 by maintainers)

Most upvoted comments

Remove node_modules folder and reinstall angular cli again. It will resolve the issue

Since 6.1, it really feels like all the commands are not working correctly… I can’t create a component in a specific module anymore via cli, the ng update does not work with PWA, schematics do not work anymore… Everything is f***ed up, and it’s been 3 weeks. What the hell are they doing ?..

for me, ng g c works but ng g action does not work. Returns Tree type is not supported. error. Trying to reinstall, global, local @angular/cli , but no luck. Any quick solution for this? All ngrx commands are not working.

  • reinstall global @angular/cli ,
  • remove node_modules and install again didn’t worked for me.

Finally removed yarn.lock and node_modules and installed again worked for me. This could help someone who has trouble now.

I deleted my package-lock.json and node_modules, ran ng g m {name} and installed modules again afterwards. Stupid, but it worked. Hope they fix it soon.

A solution that works for me by @StephenFluin note. I reinstall @angular/cli from global and project itself. it solved the issue.

@dgonza12 downgrade CLI version to 6.0.8 could be temporary solution for now.

I have this issue too. ng new <app> doesn’t work for me. Everything’s brand new. Just installed (node v8.11.3, npm v6.3.0, angular CLI v6.1.2) on my Windows 10 dev box. Tried it both from git bash & windows command prompt.

Blew away my /home/stephen/.config/yarn/ folder and reinstalled @angular/cli globally and things seem to have cleared up.