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.

No exported member 'TreeComponent'

See original GitHub issue

I’ve recently updated my treeview component to 1.3.2 and I’m running into the follow error:

Error:(5, 10) TS2305: Module ‘“node_modules/angular2-tree-component/dist/angular2-tree-component”’ has no exported member ‘TreeComponent’.

import { TreeComponent, TreeNode } from 'angular2-tree-component';`

I tried changing this to TreeModule but wasn’t sure that was correct, should the view child be a treeModule? That doesn’t seem right?

@ViewChild('tree')
tree: TreeModule;

It also complains about treeModel not being a property of tree, which is a treeModal, which makes sense.

let node: TreeNode = this.tree.treeModel.getNodeById(this.page.parentId);

How should I reference the tree now?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
isaacplmanncommented, Oct 7, 2016

PR #62 should fix this issue along with adding support for AoT compiled apps.

2reactions
alexciesielskicommented, Oct 7, 2016

+1, workaround is to open angular2-tree-component.d.ts in node_modules/angular2-tree-component'and add the following line:

import { TreeComponent } from './components/tree.component';

and add TreeComponent to the export like this:

export { TreeModel, TreeNode, ITreeOptions, TREE_ACTIONS, KEYS, IActionMapping, IActionHandler, TreeComponent };

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build fails at Angular Tree component with message "no ...
The Angular-tree-component uses lodash internally. I was having a cap on my lodash version which updated the component automatically making ...
Read more >
types/lodash has no exported member 'Cancelable' · Issue #861
I have tried npm -D @types/lodash, and removed node_modules and installed again, still I'm facing this issue, unable build our application.
Read more >
node_modules/ng-mdb-pro/index&quot - MDBootstrap
Topic: /node_modules/ng-mdb-pro/index"' has no exported member &#039 ... I'm not sure, that you've did everything in right way.
Read more >
angular/core''' has no exported member 'component, module has no ...
angular/core''' has no exported member 'component. I checked and we used version 8.3.0 together with Angular 8.0.0 and version 8.4.0 of the tree...
Read more >
types/lodash has no exported member 'Cancelable'
I have tried npm -D @types/lodash, and removed node_modules and installed again, still I'm facing this issue, unable build our application.
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