Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lodash error while building /@types/lodash/common/object.d.ts (1188,142): '(' expected

Everything was fine, but suddenly my build started to fail. And these are the errors I am seeing

ERROR in /node_modules/@types/lodash/common/function.d.ts (852,68): ';' expected.

ERROR in /node_modules/@types/lodash/common/common.d.ts (9,11): ';' expected.

ERROR in /node_modules/@types/lodash/common/common.d.ts (9,56): '(' expected.

ERROR in /node_modules/@types/lodash/common/common.d.ts (9,72): '(' expected.

ERROR in /node_modules/@types/lodash/common/common.d.ts (9,86): '(' expected.

ERROR in /node_modules/@types/lodash/common/common.d.ts (9,103): '(' expected.

My package.json shows following versions for typescript and lodash:

"@types/lodash": "^4.14.74",
"typescript": "2.1.5",

I tried to use npm i -D @types/[email protected] , but that didn't help as npm throws an error saying No compatible version found.

Anyone know what version for lodash I can use?

like image 675
yogsma Avatar asked Dec 13 '25 11:12

yogsma


1 Answers

I fixed this issue by

npm install --save @types/[email protected]

npm install alone didn't install that dependency

like image 152
yogsma Avatar answered Dec 15 '25 08:12

yogsma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!