Giter Site home page Giter Site logo

Support Node <18 about nextjs-openai HOT 5 CLOSED

spellcraftai avatar spellcraftai commented on June 2, 2024
Support Node <18

from nextjs-openai.

Comments (5)

ctjlewis avatar ctjlewis commented on June 2, 2024

From the Node <18 section:

import { OpenAI } from "openai-streams/node";

Does it still throw when you do that?

from nextjs-openai.

ctjlewis avatar ctjlewis commented on June 2, 2024

Upgrade and let me know how it goes.

from nextjs-openai.

cooltaiwanesesam avatar cooltaiwanesesam commented on June 2, 2024

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.

ctjlewis avatar ctjlewis commented on June 2, 2024

I set the engine to >=14 in that commit there, to match the streams lib, so it should work on latest.

from nextjs-openai.

cooltaiwanesesam avatar cooltaiwanesesam commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.