I can't run my project locally and assume broken dependencies but can't figure out a solution.
I received already errors when trying to install the node modules so I changed following dependencies:
"codelyzer": "^5.1.2" to "6.0.2" "jasmine-core": "~3.5.0" to "^3.8.0"
Current package.json:
{
"dependencies": {
"@angular/animations": "^10.2.2",
"@angular/cdk": "^10.2.7",
"@angular/common": "^10.2.2",
"@angular/compiler": "^10.2.2",
"@angular/core": "^10.2.2",
"@angular/forms": "^10.2.2",
"@angular/material": "^10.2.7",
"@angular/platform-browser": "^10.2.2",
"@angular/platform-browser-dynamic": "^10.2.2",
"@angular/platform-server": "^10.2.2",
"@angular/router": "^10.2.2",
"@swimlane/ngx-datatable": "^18.0.0",
"@tinymce/tinymce-angular": "^4.2.0",
"angular-svg-icon": "^10.0.0",
"core-js": "^2.6.11",
"intl": "^1.2.5",
"jsoneditor": "^5.34.0",
"lodash-es": "^4.17.11",
"rxjs": "^6.6.3",
"susy": "^2.2.14",
"tinymce": "^4.9.11",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.0",
"@angular/cli": "^10.2.0",
"@angular/compiler-cli": "^10.2.2",
"@angular/language-service": "^10.2.2",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "^2.0.8",
"@types/lodash-es": "^4.14.109",
"@types/node": "^12.11.1",
"@types/tinymce": "^4.6.0",
"codelyzer": "6.0.2",
"eslint-plugin-prettier": "^2.7.0",
"husky": "^3.1.0",
"jasmine-core": "^3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1",
"protractor": "~7.0.0",
"ts-node": "~3.2.0",
"tslint": "~6.1.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "4.0.5"
}
}
Installation of node modules works, although it results in the message: 49 vulnerabilities (2 low, 19 moderate, 27 high, 1 critical)
npm start results in many lodash errors:
ERROR in node_modules/@types/lodash/common/object.d.ts:1025:21 - error TS1110: Type expected.
1025 : K extends `${number}`
~~~
node_modules/@types/lodash/common/object.d.ts:1026:24 - error TS1005: ':' expected.
1026 ? 'length' extends keyof T
~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1026:38 - error TS1005: ';' expected.
1026 ? 'length' extends keyof T
~
node_modules/@types/lodash/common/object.d.ts:1027:26 - error TS1005: ':' expected.
1027 ? number extends T['length']
~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1028:30 - error TS1005: ':' expected.
1028 ? number extends keyof T
~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1028:44 - error TS1005: ';' expected.
1028 ? number extends keyof T
~
node_modules/@types/lodash/common/object.d.ts:1031:21 - error TS1128: Declaration or statement expected.
1031 : undefined
~
node_modules/@types/lodash/common/object.d.ts:1043:41 - error TS1110: Type expected.
1043 type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
~~~
node_modules/@types/lodash/common/object.d.ts:1043:50 - error TS1005: '}' expected.
1043 type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
~~~~
node_modules/@types/lodash/common/object.d.ts:1043:55 - error TS1128: Declaration or statement expected.
1043 type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
~
node_modules/@types/lodash/common/object.d.ts:1043:57 - error TS1005: ';' expected.
1043 type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
~
node_modules/@types/lodash/common/object.d.ts:1043:64 - error TS1005: ';' expected.
1043 type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
~~~~~
node_modules/@types/lodash/common/object.d.ts:1046:29 - error TS1005: ';' expected.
1046 : Left extends `${infer FieldKey}[${infer IndexKey}]`
~
node_modules/@types/lodash/common/object.d.ts:1046:30 - error TS1005: ';' expected.
1046 : Left extends `${infer FieldKey}[${infer IndexKey}]`
~
node_modules/@types/lodash/common/object.d.ts:1046:37 - error TS1005: ';' expected.
1046 : Left extends `${infer FieldKey}[${infer IndexKey}]`
~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1046:48 - error TS1005: ',' expected.
1046 : Left extends `${infer FieldKey}[${infer IndexKey}]`
~
node_modules/@types/lodash/common/object.d.ts:1046:55 - error TS1005: ',' expected.
1046 : Left extends `${infer FieldKey}[${infer IndexKey}]`
~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1053:26 - error TS1005: ';' expected.
1053 : P extends `${infer FieldKey}[${infer IndexKey}]`
~
node_modules/@types/lodash/common/object.d.ts:1053:27 - error TS1005: ';' expected.
1053 : P extends `${infer FieldKey}[${infer IndexKey}]`
~
node_modules/@types/lodash/common/object.d.ts:1053:34 - error TS1005: ';' expected.
1053 : P extends `${infer FieldKey}[${infer IndexKey}]`
~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1053:45 - error TS1005: ',' expected.
1053 : P extends `${infer FieldKey}[${infer IndexKey}]`
~
node_modules/@types/lodash/common/object.d.ts:1053:52 - error TS1005: ',' expected.
1053 : P extends `${infer FieldKey}[${infer IndexKey}]`
~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1307:23 - error TS1005: ';' expected.
1307 * Checks if `path` is a direct property of `object`.
~~~~
node_modules/@types/lodash/common/object.d.ts:1307:54 - error TS1005: ';' expected.
1307 * Checks if `path` is a direct property of `object`.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:1312:30 - error TS1005: ';' expected.
1312 * @returns Returns `true` if `path` exists, else `false`.
~~~~
node_modules/@types/lodash/common/object.d.ts:1312:40 - error TS1005: ';' expected.
1312 * @returns Returns `true` if `path` exists, else `false`.
~~~~
node_modules/@types/lodash/common/object.d.ts:1312:60 - error TS1005: ';' expected.
1312 * @returns Returns `true` if `path` exists, else `false`.
~~~~~
node_modules/@types/lodash/common/object.d.ts:1346:23 - error TS1005: ';' expected.
1346 * Checks if `path` is a direct or inherited property of `object`.
~~~~
node_modules/@types/lodash/common/object.d.ts:1346:67 - error TS1005: ';' expected.
1346 * Checks if `path` is a direct or inherited property of `object`.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:1351:30 - error TS1005: ';' expected.
[7[39mm1351 * @returns Returns `true` if `path` exists, else `false`.
~~~~
node_modules/@types/lodash/common/object.d.ts:1351:40 - error TS1005: ';' expected.
1351 * @returns Returns `true` if `path` exists, else `false`.
~~~~
node_modules/@types/lodash/common/object.d.ts:1351:60 - error TS1005: ';' expected.
1351 * @returns Returns `true` if `path` exists, else `false`.
~~~~~
node_modules/@types/lodash/common/object.d.ts:1751:16 - error TS1005: ';' expected.
1751 * to `undefined`. Array and plain object properties are merged recursively.
~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1756:43 - error TS1005: ';' expected.
1756 * **Note:** This method mutates `object`.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:1761:30 - error TS1005: ';' expected.
1761 * @returns Returns `object`.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:1842:33 - error TS1005: ';' expected.
1842 * This method is like `_.merge` except that it accepts `customizer` which
~
node_modules/@types/lodash/common/object.d.ts:1842:66 - error TS1005: ';' expected.
1842 * This method is like `_.merge` except that it accepts `customizer` which
~~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1844:28 - error TS1005: ';' expected.
1844 * properties. If `customizer` returns `undefined` merging is handled by the
~~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1844:49 - error TS1005: ';' expected.
1844 * properties. If `customizer` returns `undefined` merging is handled by the
~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1845:33 - error TS1005: ';' expected.
1845 * method instead. The `customizer` is invoked with seven arguments:
~~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:1852:30 - error TS1005: ';' expected.
1852 * @returns Returns `object`.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:1938:29 - error TS1005: ';' expected.
1938 * The opposite of `_.pick`; this method creates an object composed of the
~
node_modules/@types/lodash/common/object.d.ts:1939:56 - error TS1005: ';' expected.
1939 * own and inherited enumerable properties of `object` that are not omitted.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:2000:29 - error TS1005: ';' expected.
2000 * The opposite of `_.pickBy`; this method creates an object composed of the
~
node_modules/@types/lodash/common/object.d.ts:2001:56 - error TS1005: ';' expected.
2001 * own and inherited enumerable properties of `object` that `predicate`
~~~~~~
node_modules/@types/lodash/common/object.d.ts:2001:70 - error TS1005: ';' expected.
2001 * own and inherited enumerable properties of `object` that `predicate`
~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:2051:54 - error TS1005: ';' expected.
2051 * Creates an object composed of the picked `object` properties.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:2093:47 - error TS1005: ';' expected.
2093 * Creates an object composed of the `object` properties `predicate` returns
~~~~~~
node_modules/@types/lodash/common/object.d.ts:2093:67 - error TS1005: ';' expected.
2093 * Creates an object composed of the `object` properties `predicate` returns
~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:2443:33 - error TS1005: ';' expected.
2443 * This method is like `_.update` except that it accepts `customizer` which is
~
node_modules/@types/lodash/common/object.d.ts:2443:67 - error TS1005: ';' expected.
2443 * This method is like `_.update` except that it accepts `customizer` which is
~~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:2444:47 - error TS1005: ';' expected.
2444 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
~~~~
node_modules/@types/lodash/common/object.d.ts:2444:59 - error TS1005: ';' expected.
2444 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
~~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:2444:80 - error TS1005: ';' expected.
2444 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:2445:65 - error TS1005: ';' expected.
2445 * path creation is handled by the method instead. The `customizer` is invoked
~~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:2448:43 - error TS1005: ';' expected.
2448 * **Note:** This method mutates `object`.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:2456:30 - error TS1005: ';' expected.
2456 * @returns Returns `object`.
~~~~~~
node_modules/@types/lodash/common/object.d.ts:2581:1 - error TS1160: Unterminated template literal.
2581
** Angular Live Development Server is listening on ... **
Node Version: 16.20.2
I tried --legacy-peer-deps and --force, also npm audit fix but anyway I receive the lodash errors
I appreciate every help!
Try replacing your
typescriptindevDependencies:From: https://github.com/microsoft/TypeScript/pull/54781#issuecomment-1607903315