transform icon indicating copy to clipboard operation
transform copied to clipboard

TS to JSON error

Open TchernyavskyDaniil opened this issue 2 years ago • 5 comments

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'

TchernyavskyDaniil avatar Sep 16 '22 09:09 TchernyavskyDaniil

I'm having similar issues using the website tool

omniviewsports avatar Dec 01 '22 19:12 omniviewsports

+1

drewlustro avatar Jan 03 '23 23:01 drewlustro

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

drewlustro avatar Jan 03 '23 23:01 drewlustro

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

ritz078 avatar Jan 04 '23 09:01 ritz078

Is there any progress with this?

Wyctus avatar Feb 02 '23 14:02 Wyctus