-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "Tree type is not supported." when generating new module in v6.1.1 #11683
Comments
Clean install of latest Angular CLI this morning. v6.1.1 I also get this message when running:
I also tried 6.1.0 same error. I had to downgrade CLI version to 6.0.7 in order for |
@darrenmothersele That's interesting, because I tried to run the above command on my v6.1.1 and it was successfully executed. I also went ahead and created a new project and run the commands that could not executed earlier successfully without any issues. On my part, it seems to be an issue with upgrading to Angular 6.1.1 from 6.1.0. |
Versions |
Hi, Could you run Also, as a way to try to fix this, could you try getting rid of you |
Here is the output of the
I already tried to remove the entire |
Upgrade from 6.0.7 to 6.1.0 has the same issue with 'generate' command.
|
@adnanebrahimi Am also getting the same error on both 6.1.0 and 6.1.1.
|
Any news on this? I was getting |
I ran |
@odahcam Thanks. I can confirm that works. I first removed the |
It seems like Before:
After:
|
+1 |
I'm keeping this issue open as we need to figure out forward compatibility in Schematics for people who have multiple version of a library. |
6.1.2 will also support backward compatibility? |
Got similar issues
Here's the schematic versions
|
Updating my custom schematic to:
And Angular CLI:
Still gives the error:
Am I missing something else? |
Here too, the problem still exists. I have to run |
Something new about this? I can't publish a new release of my custom schematics. |
I solved this issue by updating all cli packages individually that listed in readme |
Having this same problem.
and
like @mainawycliffe said in the first report, seems to work if you do --module flag. will try re-installing cli globally as @StephenFluin did to see if it helps. I'm using npm not yarn. |
nope, global reinstall did not help. I guess I want routing! |
@toddwseattle try updating your packages using npm ( |
@mainawycliffe npm update did not solve...moved on with the --routing work around |
There is something wrong with the filter function, when I removed it, it works fine. const templateSource = apply(url('./files'), [
options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')),
template({
...stringUtils,
...options
}),
move(parsedPath.path)
]); This works: const templateSource = apply(url('./files'), [
template({
...stringUtils,
...options
}),
move(parsedPath.path)
]); |
After investigating I found that in the following code: function filter(predicate) {
return ((tree) => {
// TODO: Remove VirtualTree usage in 7.0
if (tree instanceof virtual_1.VirtualTree) {
return new filtered_1.FilteredTree(tree, predicate);
}
else if (tree instanceof host_tree_1.HostTree) {
return new host_tree_1.FilterHostTree(tree, predicate);
}
else {
throw new exception_1.SchematicsException('Tree type is not supported.');
}
});
}
|
As @StephenFluin note in another post. |
I get the same problem with @angular/[email protected] |
try to remove the entire node_module folder + delete package_lock file. |
Thank you @nisimjoseph . That saved me some pain. |
Same issue Tree type is not supporteed but generating ngrx action. any workaround for this? |
Same again here, my command line: Any suggestions? I'm assuming there's some issue with the following file: |
@inthegarage please refer this issue |
I'm having the same issue. Bumped into it when writing my own schematic. My tests work fine, but when I run the actual schematic using the schematics-cli I got the error. Turns out the angular-cli also gives the error, so it must be something in @schematics/angular?
|
I'm also experiencing this issue. Seems to have something to do with this commit: 9582b84 |
@nisimjoseph thx - that helped. I am using angular/cli 6.1.4. |
Why is this issue closed? This is still a problem in this version. Uninstalling and reinstalling cli does not work. It is also not fixed with downgrading. |
@will0684 I just posted above your comment. Please try it. |
The issue is closed automatically when the PR is merged that fixes it. You can get the fixed version from our snapshot build now |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
Angular CLI 6.1.1
Windows 10
Node 10.7.0
Yarn 1.9.2
Repro steps
Upgrade to the latest version of Angular 6.1.1 (Works okay on 6.1.0)
run
ng g module modules/test2 --flat
or just
ng g module modules/test2
or just
ng g module test2
or just
ng g m test2
Interestingly, it works when generating modules with routing flag, but haven't had any success with any other flags
ng g module modules/test2 --flat -routing
orng g module test2 --routing
works.The log given by the failure
I am getting a simple message without any other details attached:
Tree type is not supported.
Not enough information to help me troubleshoot where the problem is. I tried this on two of my projects.
Desired functionality
Should generate a new module in the specified location.
UPDATE
I also deleted the entire
node_modules
folder and re installed the packages without success. Downgrading back to 6.1.0 works as expected.The text was updated successfully, but these errors were encountered: