angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Generate component results in tree type not supported error

Open roytouw opened this issue 7 years ago β€’ 6 comments

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

Yes before upgrading to angular 8 i generated components this way, but I did use windows before.

Description

A clear and concise description of the problem...

Running the command ng generate component or sudo ng generate component results in the error message: "Tree type is not supported."

πŸ”¬ Minimal Reproduction

πŸ”₯ Exception or Error




Tree type is not supported.

🌍 Your Environment




Angular CLI: 8.0.1
Node: 10.16.0
OS: linux x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                                    Version
--------------------------------------------------------------------
@angular-devkit/architect                  0.800.1
@angular-devkit/build-angular              0.800.1
@angular-devkit/build-optimizer            0.800.1
@angular-devkit/build-webpack              0.800.1
@angular-devkit/core                       0.7.4
@angular-devkit/schematics                 0.7.4
@angular/cli                               8.0.1
@angular/fire                              5.2.1
@angular/http                              7.2.14
@ngtools/webpack                           8.0.1
@nguniversal/express-engine                6.1.0
@nguniversal/module-map-ngfactory-loader   6.1.0
@schematics/angular                        0.7.4
@schematics/update                         0.800.1
rxjs                                       6.5.2
typescript                                 3.4.5
webpack                                    4.30.0

Anything else relevant?

roytouw avatar Jun 20 '19 11:06 roytouw

From the versions above, you seems to have some mismatches versions

@angular-devkit/architect                  0.800.1
@angular-devkit/build-angular              0.800.1
@angular-devkit/build-optimizer            0.800.1
@angular-devkit/build-webpack              0.800.1
@angular-devkit/core                       0.7.4
@angular-devkit/schematics                 0.7.4
@angular/cli                               8.0.1
@schematics/angular                        0.7.4
@schematics/update                         0.800.1

I suspect that you have redundant packages listed in your application package.json

If you have any of the following in your package.json kindly try removing them and do an fresh new npm install

  • @schematics/angular
  • @angular-devkit/core
  • @angular-devkit/schematics
  • @angular-devkit/build-optimizer
  • @angular-devkit/build-webpack

alan-agius4 avatar Jun 20 '19 13:06 alan-agius4

From the versions above, you seems to have some mismatches versions

@angular-devkit/architect                  0.800.1
@angular-devkit/build-angular              0.800.1
@angular-devkit/build-optimizer            0.800.1
@angular-devkit/build-webpack              0.800.1
@angular-devkit/core                       0.7.4
@angular-devkit/schematics                 0.7.4
@angular/cli                               8.0.1
@schematics/angular                        0.7.4
@schematics/update                         0.800.1

I suspect that you have redundant packages listed in your application package.json

If you have any of the following in your package.json kindly try removing them and do an fresh new npm install

  • @schematics/angular
  • @angular-devkit/core
  • @angular-devkit/schematics
  • @angular-devkit/build-optimizer
  • @angular-devkit/build-webpack

I don't seem to have any of these dependencies in my package.json.

roytouw avatar Jun 20 '19 13:06 roytouw

Have you tried using npm prune?, If that doesn't help kindly try to remove the lock file and node_modules and do a fresh npm install.

Something is not quite right with your dependency tree.

Are you using any other schematics apart from the Angular Schematics supplied via @schematics/angular?

alan-agius4 avatar Jun 20 '19 17:06 alan-agius4

Can you also try running npm ls @schematics/angular? This should show which packages are requiring it.

clydin avatar Jun 20 '19 17:06 clydin

Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information.

If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template.

alan-agius4 avatar Jul 19 '19 13:07 alan-agius4

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.