No exported member 'TreeComponent'
See original GitHub issueI’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:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top 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 ' ... 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
PR #62 should fix this issue along with adding support for AoT compiled apps.
+1, workaround is to open
angular2-tree-component.d.ts
innode_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 };