BookLore
BookLore copied to clipboard
fix: npm install error
Fixes an error
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/typescript
npm error dev typescript@"5.8.3" from the root project
npm error peer typescript@">=5.5 <5.9" from @angular-devkit/[email protected]
npm error node_modules/@angular-devkit/build-angular
npm error dev @angular-devkit/build-angular@"19.2.7" from the root project
npm error 14 more (@angular-eslint/builder, ...)
npm error
npm error Could not resolve dependency:
npm error peer typescript@">=4.8.4 <5.8.0" from [email protected]
npm error node_modules/typescript-eslint
npm error dev typescript-eslint@"8.18.0" from the root project
npm error peer typescript-eslint@"^8.0.0" from [email protected]
npm error node_modules/angular-eslint
npm error dev angular-eslint@"19.3.0" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/typescript
npm error peer typescript@">=4.8.4 <5.8.0" from [email protected]
npm error node_modules/typescript-eslint
npm error dev typescript-eslint@"8.18.0" from the root project
npm error peer typescript-eslint@"^8.0.0" from [email protected]
npm error node_modules/angular-eslint
npm error dev angular-eslint@"19.3.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
It should be safe to use non-fixed minor versions of typescript and typescript-eslint.
Probably other dependencies should also be updated to use ^ or ~ this will make maintenance easier.
And to ensure build works as expected, there is package-lock.json exactly for this reason.
I gave it a test to see if updated version of eslint finds any new errors which were not covered previously and found out that there are 168 problems (168 errors, 0 warnings).
Then, I rolled back to typescript: 5.7, typescript-eslint: 8.18 and found out that there is the same amount of errors.
Maybe then you should consider removing ESLint from dependencies :/