Reputation: 10586
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?
Upvotes: 16
Views: 37628
Reputation: 10586
I fixed this issue by
npm install --save @types/[email protected]
npm install alone didn't install that dependency
Upvotes: 30