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.

.../node_modules/@types/lodash"' has no exported member 'Cancelable'

See original GitHub issue

The configuration of my project is as follows:

  • Angular CLI: 8.0.0
  • Node: 10.13.0
  • npm: 6.4.1
  • rxjs: 6.4.0
  • typescript: 3.4.5
  • webpack: 4.39.2
  • @types/lodash": "~4.14.118
  • lodash": "4.17.12
  • angular-tree-component": "8.0.0 // for Angular 9 or higher you should switch to the @circlon/angular-tree-component
  • Windows 10 x64

ng serve:

ERROR in node_modules/angular-tree-component/dist/components/tree-viewport.component.d.ts:3:10 - error TS2305: Module '"myPath/node_modules/@types/lodash"' has no exported member 'Cancelable'. import { Cancelable } from 'lodash';

I have tried with:

  • Removing node_modules completely and run a clean install
  • Update @types/lodash to 4.14.161
  • Update lodash to 4.17.20
  • Update angular-tree-component to 8.0.2
  • npm i -D @types/lodash from #643

Nothing in #643 helped me

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
zmpocommented, Sep 1, 2020

We have solved this error by setting @types/lodash to 4.14.159, may be you can try this.

0reactions
Luis16287commented, Sep 2, 2020

@tobiasengelhardt Thanks for the reply. At the moment it is a requirement for us to stay in version 8.x.x, it is in our plans to update to angular 9 but not in the short term.

I tried the following configuration

  • Angular CLI: 8.0.0
  • Node: 10.13.0
  • npm: 6.4.1
  • rxjs: 6.4.0
  • typescript: 3.4.5
  • webpack: 4.39.2
  • lodash": "4.17.12 with these changes
  • @types/lodash": "4.14.160
  • angular-tree-component": "8.3.0

And it has worked correctly for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
node_modules /@types/lodash"' has no exported member 'Cancelable'. #47166 ... Angular CLI: 8.0.0; Node: 10.13.0; npm: 6.4.1; rxjs: 6.4.0 ...
Read more >
Build fails at Angular Tree component with message "no ...
I was having a cap on my lodash version which updated the component automatically making it more difficult to find. Changed "@types/lodash": "^ ......
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 >
lodash/lodash - Gitter
A JavaScript utility library delivering consistency, modularity, performance, & extras. People. Repo info.
Read more >
Fixing Lodash TypeScript Errors By Upgrading @types/lodash ...
To paint the picture, I had created a "lodash-extended" module in my TypeScript application: // Import the core node services. import ...
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