ERROR in node_modules/@types/lodash/common/array.d.ts(37,24): error TS1005: ';' expected

Viewed 1799

I have an Angular-5 application with:

"@types/lodash-es": "^4.17.4",

Initially, When I did ng serve, I got this error:

ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":["C://xampp//htdocs//angular-laravel-hrms//HRMS2UI//src//styles"]}!./src/styles.scss Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (83)

But when I did:

npm rebuild node-sass

the error changed to:

ERROR in node_modules/@types/lodash/common/array.d.ts(37,24): error TS1005: ';' expected. node_modules/@types/lodash/common/array.d.ts(483,22): error TS1005: ';' expected. node_modules/@types/lodash/common/array.d.ts(483,41): error TS1005: ',' expected. node_modules/@types/lodash/common/array.d.ts(483,44): error TS1005: '(' expected.

I did npm i --package-lock-only

but the error is still there.

How do I get it resolved?

Thanks

1 Answers

If the version of node is wrong, you must downgrade node, or upgrade node-sass, until you have a compatible pair. If the node version is supported, you may just need to run:

npm rebuild node-sass
Related