hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client
https://heyapi.vercel.app
MIT License
651 stars 47 forks source link

It does not pickup typescript in monorepo environment w/ pnpm #578

Closed vladmiller closed 1 month ago

vladmiller commented 1 month ago

Description

I have a monorepo managed with pnpm, where typescript dependency lives in the root package.json file.

Now, openapi-ts does not see typescript from root module and requires typescript that is installed locally.

> web-renter-portal@ gen:api-local /Users/johndoe/Projects/portal/apps/web-renter-portal
> openapi-ts --input http://127.0.0.1:5000/swagger/swagger.json --output app/api --client fetch --useOptions

🔥 Unexpected error occurred. Log saved to /Users/johndoe/Projects/portal/apps/web-renter-portal/openapi-ts-error-1715779812572.log
🔥 Unexpected error occurred. 🚫 dependency missing - TypeScript must be installed

OpenAPI specification (optional)

No response

Configuration

No response

System information (optional)

No response

mrlubos commented 1 month ago

Please make sure you're on the latest version :)

vladmiller commented 1 month ago

@mrlubos oh, I just had to be on the latest version :-D

Thanks and apologies for wasting your time.

mrlubos commented 1 month ago

No worries @vladmiller, thank you for using this package!