Skip to content

tsc fails over uploads.ts #1534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
ValorHeart opened this issue Jun 6, 2025 · 4 comments
Closed
1 task done

tsc fails over uploads.ts #1534

ValorHeart opened this issue Jun 6, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@ValorHeart
Copy link

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

✖ tsc --noEmit -p tsconfig.json:
node_modules/openai/src/internal/uploads.ts(174,26): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'object'.
husky - pre-commit script failed (code 1)

To Reproduce

  1. Install sdk 5.1.1
  2. run tsc

Code snippets

OS

macos

Node version

node v22.11.0

Library version

5.1.1

@ValorHeart ValorHeart added the bug Something isn't working label Jun 6, 2025
@RobertCraigie
Copy link
Collaborator

RobertCraigie commented Jun 6, 2025

Thanks for the report, would you be able to share your tsconfig.json and any types packages you have installed?

Also it looks like you have an import from 'openai/src' somewhere, you should remove that and replace it with just 'openai'.

@ValorHeart
Copy link
Author

Those are my types packages:

    "@types/node": "^22.15.18",
    "typescript": "^5.8.3",

I've tried looking if I import from openai/src, but I do not, I import directly from openai

When I open the file manually, my IDE marks it with error:

Image

@RobertCraigie
Copy link
Collaborator

thanks! this should be fixed in the next release #1535

@ValorHeart
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants