Portkey-AI / portkey-node-sdk

Build reliable, secure, and production-ready AI apps easily.

Home Page:https://portkey.ai/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type Errors bubbling up to project

HisWordLLC opened this issue Β· comments

export import LLMOptions = Types.LLMOptions;

I don't know if others have experienced this, but I'm getting a Type Error bubbling up to the project level:

> tsc

node_modules/portkey-ai/dist/src/index.ts:7:1 - error TS1269: Cannot use 'export import' on a type or type-only namespace when 'isolatedModules' is enabled.

7 export import LLMOptions = Types.LLMOptions;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in node_modules/portkey-ai/dist/src/index.ts:7

Will just ignore type checking in builds for now. Let me know if you want a PR to assist. πŸ‘

πŸ€–

That's great to hear that you're willing to help out! Your contribution would be much appreciated. Feel free to submit a PR with your proposed fix whenever you're ready. Thank you for your willingness to assist with this issue!


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a πŸ‘ if this is helpful and πŸ‘Ž if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

I'm getting the same issue with using Next.js. Everything works fine until you run next build.

image

Thanks for reporting this and also providing detailed errors. We will push a fix for this today

Thanks for the fast reply, @VisargD

Really enjoying the service so far. Have some small UI papercuts in the platform that I can submit if it helps. Let me know a good place to do so.

That's so good to hear!! You can join our discord and report the UI feedback there. Here is our discord link: https://t.co/lZEFk6kbbb

The ideal solution here would have been to change the re-export to support types in isolatedModules which would have made the export something like this (as mentioned here in TS docs):

export type { LLMOptions } from "./_types/portkeyConstructs";

But the LLMOptions interface itself is deprecated now and we do not support it anymore. So we will be removing the interface and export itself. I will be merging the PR for this very soon.

This issue has been fixed in the latest release of the SDK. Please update version to 1.1.3 and try it out.

@VisargD I noticed the churn/reversion and wanted to say thanks for your efforts!

I've run yarn upgrade portkey-ai@^1.1.3 and can confirm on my project that nextjs can [again/now] build. βœ…

That's great! Thanks for the confirmation.

Closing this issue as it is resolved now. Feel free to create a new one if you have other queries. Thanks again for reporting and providing details.

Just updated and tested. All works great! Thanks for the quick solve. πŸ˜ƒ