node.js - npm run build is failing due to @types.lodash-es incompatability - Stack Overflow

admin2025-04-20  0

These are the errors I'm facing in Angular 7:

22:12:30  node_modules/@types/lodash/common/collection.d.ts(753,33): error TS2304: Cannot find name 'PropertyName'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(763,47): error TS2304: Cannot find name 'ObjectIterator'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(763,65): error TS2304: Cannot find name 'ListOfRecursiveArraysOrValues'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(763,117): error TS2304: Cannot find name 'PropertyName'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(767,33): error TS2304: Cannot find name 'PropertyName'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(786,48): error TS2304: 


 
  • typescript : 3.2.4

  • "lodash-es": "4.17.11"

  • "@types/lodash-es": "4.17.1"

  • "lodash": "4.17.11"

  • I tried changing lodash-es versions as suggested through few online resources

  • I couldn't update typescript as it is the last compatible version for Angular 7.

Can someone suggest a solution?

These are the errors I'm facing in Angular 7:

22:12:30  node_modules/@types/lodash/common/collection.d.ts(753,33): error TS2304: Cannot find name 'PropertyName'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(763,47): error TS2304: Cannot find name 'ObjectIterator'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(763,65): error TS2304: Cannot find name 'ListOfRecursiveArraysOrValues'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(763,117): error TS2304: Cannot find name 'PropertyName'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(767,33): error TS2304: Cannot find name 'PropertyName'.
22:12:30  node_modules/@types/lodash/common/collection.d.ts(786,48): error TS2304: 


 
  • typescript : 3.2.4

  • "lodash-es": "4.17.11"

  • "@types/lodash-es": "4.17.1"

  • "lodash": "4.17.11"

  • I tried changing lodash-es versions as suggested through few online resources

  • I couldn't update typescript as it is the last compatible version for Angular 7.

Can someone suggest a solution?

Share Improve this question edited Mar 4 at 7:20 Desu Sri Meghana asked Mar 3 at 17:22 Desu Sri MeghanaDesu Sri Meghana 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

removed "@types/lodash-es" package

instead added "@types/lodash" : 4.14.149

and the build was green

Thanks

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745081183a283867.html

最新回复(0)