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

vite2 + vue3 ReferenceError: __dirname is not defined #180

Closed
oripka opened this issue Mar 11, 2023 · 1 comment
Closed

vite2 + vue3 ReferenceError: __dirname is not defined #180

oripka opened this issue Mar 11, 2023 · 1 comment

Comments

@oripka
Copy link

oripka commented Mar 11, 2023

Running into this issue:

transitive-bullshit/agentic#334

__dirname is not defined

at node_modules/gpt-3-encoder/Encoder.js (http://localhost:3000/_nuxt/node_modules/.vite/deps/@waylaidwanderer_chatgpt-api.js?v=eadc4690:315:56)
at __require2 (http://localhost:3000/_nuxt/node_modules/.vite/deps/chunk-CLC6CPQL.js?v=eadc4690:19:50)
at node_modules/gpt-3-encoder/index.js (http://localhost:3000/_nuxt/node_modules/.vite/deps/@waylaidwanderer_chatgpt-api.js?v=eadc4690:470:30)
at __require2 (http://localhost:3000/_nuxt/node_modules/.vite/deps/chunk-CLC6CPQL.js?v=eadc4690:19:50)
at http://localhost:3000/_nuxt/node_modules/.vite/deps/@waylaidwanderer_chatgpt-api.js?v=eadc4690:17066:36
@waylaidwanderer
Copy link
Owner

Not sure what version you're using, but I don't use gpt-3-encoder in the project anymore. It seems like you need to update.

However, ChatGPTClient isn't meant to be used in the frontend. You should run an API server instead.

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

2 participants