Comments (5)
From the Node <18 section:
import { OpenAI } from "openai-streams/node";
Does it still throw when you do that?
from nextjs-openai.
Upgrade and let me know how it goes.
from nextjs-openai.
With Node 16.X yarn add nextjs-openai openai-streams
openai-streams installed fine, but nextjs-openai failed to install with the above original post error.
With Node 18.X, there is no issue to install, and run on localhost. However, I was not able to deploy to Digital Ocean as the nextjs-openai module is not supported as Digital Ocean App Platform currently not supporting Node 18.
from nextjs-openai.
I set the engine to >=14 in that commit there, to match the streams lib, so it should work on latest.
from nextjs-openai.
Look like the issue might be related to the 'yield-stream' module where by default it require Node 18+. For older version it need to import from import { yieldStream } from "yield-stream/node";
according to the documentation.
https://github.com/SpellcraftAI/nextjs-openai/blob/canary/src/pages/api/node.ts#L4
from nextjs-openai.
Related Issues (13)
- Critial error: Cannot find module... HOT 1
- done doesnt seem to change from true after rest call HOT 4
- How to prevent API call on page load? HOT 1
- Seeing errors in the underlying streaming API parsing HOT 1
- useTextBuffer's done variable not updating when streaming is finished HOT 1
- Stream performance is different on mobile vs desktop
- no way to "POST" a body using <StreamingText> HOT 4
- TypeError: Response body object should not be disturbed or locked HOT 2
- the `useTextBuffer` hook is causing an infinate loop HOT 4
- Return Types HOT 3
- Chat endpoint never sets `done` to true HOT 5
- `useTextBuffer` Issue with Chat Endpoint HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextjs-openai.