my ts code was working fine both locally and on the server but after I restarted the code on production I found there were errors(restarting installs package all over again with yarn install) and when I yarn install locally now it also creates same error
server/Startup.ts:119:12 - error TS2339: Property 'status' does not exist on type 'Response<any, Record<string, any>>'.
119 .status(HttpStatusCode.NOT_FOUND)
~~~~~~
Found 1640 errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
the typescript errors are nonsense to my eyes with the experience I have now, cause I know for sure
server/routes/savings_report.routes.ts:17:17 - error TS2339: Property 'get' does not exist on type 'Router'.
17 this.router.get(
~~~
the express router has the get property and the code has been working fine before
I honestly don't know where the issue is here, yarn? npm? or ts-node itself?
- I tried to use npm to install the packages
- I tried to clean cache of npm and yarn to install again
- I tried to remove the lock files(yarn.lock and package-lock.json) to reinstall fresh from the package json.
- I asked my colleague to clone and run the code (previously working code from main branch) and the same errors like these show up.