ritz078 / transform

A polyglot web converter.
https://transform.tools
MIT License
7.93k stars 581 forks source link

TS to JSON error #339

Open TchernyavskyDaniil opened 2 years ago

TchernyavskyDaniil commented 2 years ago

https://transform.tools/typescript-to-json-schema

POST https://transform.tools/api/typescript-to-json-schema Status: 500 Response:

Cannot find global type 'Array'.

Cannot find global type 'Boolean'.

Cannot find global type 'Function'.

Cannot find global type 'IArguments'.

Cannot find global type 'Number'.

Cannot find global type 'Object'.

Cannot find global type 'RegExp'.

Cannot find global type 'String'.

File '/var/task/node_modules/typescript/lib/lib.d.ts' not found.
  The file is in the program because:
    Default library for target 'es5'
omniviewsports commented 1 year ago

I'm having similar issues using the website tool

drewlustro commented 1 year ago

+1

drewlustro commented 1 year ago

It's due to the project's serverless deployment. There is no filesystem on cloud edge functions, thus many node APIs are absent.

Seems like the conversion library relies on the TypeScript SDK, which it tries to read from node_modules/ (doesn't exist on cloud)

See https://github.com/ritz078/transform/issues/259#issuecomment-869171354

ritz078 commented 1 year ago

Correct. I am looking to move to some other hosting service.

Wyctus commented 1 year ago

Is there any progress with this?