Skip to content
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

No matching version for "ai" that matches "2.1.1" #110

Closed
JackHowa opened this issue Jun 16, 2023 · 6 comments
Closed

No matching version for "ai" that matches "2.1.1" #110

JackHowa opened this issue Jun 16, 2023 · 6 comments

Comments

@JackHowa
Copy link

Looking forward to using this starter and the integrations. Appreciate the work here. Seeing an issue after trying to deploy the next.js openai starter:

Vercel CLI 30.2.1
--
09:27:41.741 | Installing dependencies...
09:27:41.992 | yarn install v1.22.17
09:27:42.011 | info No lockfile found.
09:27:42.015 | [1/4] Resolving packages...
09:27:44.822 | error Couldn't find any versions for "ai" that matches "2.1.1"
09:27:44.822 | info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
09:27:44.842 | Error: Command "yarn install" exited with 1
09:27:45.232 | BUILD_UTILS_SPAWN_1: Command "yarn install" exited with 1

Looks like the latest release is 2.1.0.

https://github.com/vercel-labs/ai/releases/tag/ai%402.1.0
See latest release is 2.1.0

Also this seems like it's a similar problem as #82

@FelixWaweru
Copy link

I'm also getting the same error

Maybe the automated build for version 2.1.1 didn't deploy the package?

@bcarsley
Copy link

Yeah just like to agree here -- tried both npm and pnpm, various different ways of building, same error as show above. I will manually clone, change the version, and see if that works -- seems like an easy enough fix

@bcarsley
Copy link

Yeah just like to agree here -- tried both npm and pnpm, various different ways of building, same error as show above. I will manually clone, change the version, and see if that works -- seems like an easy enough fix

Update: yes, changing to 2.1.0 does in fact allow it to build and start the server on localhost (pnpm install => pnpm dev) ... BUT there are some issues with the class StreamingTextResponse, which could be a module versioning problem -- seems like this build may actually be dependent on the release of 2.1.1? see tracebacks below, I didn't change anything else about the build other than the version of the ai module (and as you can see even in 2.1.0 StreamingTextResponse seems to be defined as a constructor, making the traceback i got kinda curious)
Screenshot 2023-06-16 at 11 22 21 AM
Screenshot 2023-06-16 at 11 22 47 AM

@ashrielbrian
Copy link

@bcarsley I got around it by simply creating the Response class on my own, since StreamingTextResponse is just a wrapper around it:

return new Response(stream, {
        status: 200,
        headers: {
            "Content-Type": "text/plain; charset=utf-8"
        }
    })
// return new StreamingTextResponse(stream)

@shuding
Copy link
Member

shuding commented Jun 16, 2023

Thanks for the feedback! Can you try 2.1.2? It should have the problems fixed.

@shuding shuding closed this as completed Jun 16, 2023
@JackHowa
Copy link
Author

ok thanks @shuding -- installing as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants