feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
14.98k stars 743 forks source link

json-schema-to-ts recent update breaks compiling #3199

Closed ericandre615 closed 1 year ago

ericandre615 commented 1 year ago

Steps to reproduce

After running npm create feathers my-app and running through the installer We ran into a few issues when trying to run npm run compile One issue is that it can't find type definitions for cors we had to npm install --save-dev @types/cors to resolve this, but it wasn't clear at first. The other issue is that we ran into about 50 errors that all seemed to be related to a recent update to json-schema-to-ts package. This package was just updated about 21 hours ago (to 2.9.0). We fixed all our issues by explicitly installing "json-schema-to-ts": "2.8.2" We also noticed this seem to be an issue before referenced here: https://github.com/feathersjs/feathers/pull/3180/files

So it seems like that package json-schema-to-ts likes to make breaking changes for minor version updates.

Expected behavior

installing and compiling a new feathersjs app should not fail with type issues due to json-schema-to-ts updates.

Actual behavior

There are 50+ errors all due to a breaking update from the json-schema-to-ts dependency

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): json-schema-to-ts version 2.9.0 breaks compiling @types/cors not being installed by the npm create feathers breaking compiling featherjs 5.0.5

NodeJS version: 18.16.0

Operating System: MacOS (M1), MacOS (intel), Arch Linux

Browser Version: N/A React Native Version: N/A Module Loader:

AbdBarho commented 1 year ago

a temporary workaround that does not involve downgrading is to disable lib check in your tsconfig.json

{
  "compilerOptions": {
    "skipLibCheck": true
  }
}

Related: https://github.com/ThomasAribart/json-schema-to-ts/issues/144

daffl commented 1 year ago

This should be fixed now.