Closed nayan27 closed 3 months ago
I have the same problem, Looking forward to a resolution。
same problem
same problem
I was having this issue, solved it by:
npm uninstall keyv
npm install keyv
Worked fine afterwards.
Doesn't work https://github.com/transitive-bullshit/chatgpt-api/issues/568#issuecomment-1618257116
NOT WORKS
"npm uninstall keyv npm install keyv Worked fine afterwards."
I just tried again on a different computer.
Went inside node_modules/keyv/src/index.js
and changed the first two lines to this.
// 'use strict';
import EventEmitter from 'events';
Not sure if this step is necessary, but i then did npm uninstall keyv
.
It worked fine afterwards.
Sorry if this doesn't work, I'm just hoping this helps someone else!
This has proven to be an impassable issue for me. None of the solutions work
This has proven to be an impassable issue for me. None of the solutions work
It's likely this can be solved if I better understood Vite and it's internal support for NodeJs methods. But a hacky solution that worked for me was to remove class extension type, along with the invocation of super()
class Keyv extends EventEmitter {
constructor(uri, {emitErrors = true, ...options} = {}) {
super();
class Keyv {
constructor(uri, {emitErrors = true, ...options} = {}) {
// super();
don't forget to force vite to rebuild
npm run vite --force
It's just missing Node events in the browser:
npm i events --save
@noel-schenk your solution worked for me! Thank you!!
This project is undergoing a major revamp; closing out old issues as part of the prep process.
The chatgpt
package is pretty outdated at this point. I recommend that you use the openai package or the openai-fetch package instead.
Verify latest release
chatgpt
releaseVerify webapp is working
Environment details
Node 14.18.1 Mac Monterey 12.6.2 Chrome Version 113.0.5672.92 (Official Build) (x86_64)
Vite - React Project with the following Package.json:
Describe the Bug
Attempting to use the library in a hook function:
Getting the error message above.