While installing node_modules, I use the --legacy-peer-deps or --force flags. This works fine on windows on my system locally, but it doesn't work while deploying the project in ubuntu server!
This is the error I get:
npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR! npm ERR! While resolving: @nestjs/mongoose@8.0.1npm ERR! Found: mongoose@6.0.1npm ERR! node_modules/mongoosenpm ERR! mongoose@"6.0.1" from the root projectnpm ERR! mongoose@"*" from @types/mongoose@5.11.96npm ERR! node_modules/@types/mongoosenpm ERR! dev @types/mongoose@"5.11.96" from the root projectnpm ERR!npm ERR! Could not resolve dependency:npm ERR! peer mongoose@"^5.11.15 || ^5.12.4" from @nestjs/mongoose@8.0.1npm ERR! node_modules/@nestjs/mongoosenpm ERR!npm ERR! Conflicting peer dependency: mongoose@5.13.14npm ERR! node_modules/mongoosenpm ERR! peer mongoose@"^5.11.15 || ^5.12.4" from @nestjs/mongoose@8.0.1npm ERR! node_modules/@nestjs/mongoosenpm ERR! @nestjs/mongoose@"8.0.1" from the root projectnpm ERR!npm ERR! Fix the upstream dependency conflict, or retrynpm ERR! this command with --force, or --legacy-peer-depsnpm ERR! to accept an incorrect (and potentially broken) dependency resolution.npm ERR!npm ERR! See C:\Users\Admin\AppData\Local\npm-cache\eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\Admin\AppData\Local\npm-cache\_logs\2022-06-14T08_44_12_502Z-debug-0.log