chat-ui
chat-ui copied to clipboard
npm run error (latest git pull)
I created a .env.local as:
MONGODB_URL=mongodb://localhost:27017
MONGODB_DB_NAME=chat-ui
MONGODB_DIRECT_CONNECTION=false
COOKIE_NAME=hf-chat
HF_TOKEN=
HF_API_ROOT=https://api-inference.huggingface.co/models
OPENAI_API_KEY=
Then I tried:
npm install #everything went fine
npm run dev -- --host 0.0.0.0
but I got the error below:
(node:770942) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
11:47:42 AM [vite] Error when evaluating SSR module /src/lib/server/auth.ts:
|- SyntaxError: "undefined" is not valid JSON
at JSON.parse (<anonymous>)
at /home/shuther/devProjects/chat-ui/src/lib/server/auth.ts:43:14
at async instantiateModule (file:///home/shuther/devProjects/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)
11:47:42 AM [vite] Error when evaluating SSR module /src/hooks.server.ts: failed to import "/src/lib/server/auth.ts"
|- SyntaxError: "undefined" is not valid JSON
at JSON.parse (<anonymous>)
at /home/shuther/devProjects/chat-ui/src/lib/server/auth.ts:43:14
at async instantiateModule (file:///home/shuther/devProjects/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)
SyntaxError: "undefined" is not valid JSON
at JSON.parse (<anonymous>)
at /home/shuther/devProjects/chat-ui/src/lib/server/auth.ts:43:14
at async instantiateModule (file:///home/shuther/devProjects/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)
SyntaxError: "undefined" is not valid JSON
at JSON.parse (<anonymous>)
at /home/shuther/devProjects/chat-ui/src/lib/server/auth.ts:43:14
at async instantiateModule (file:///home/shuther/devProjects/chat-ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)
On the browser side, I have error 500 (nice picture)
Not sure why that would be the case :eyes: I don't recognize this warning here
(node:770942) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
Does this ring a bell to you?
Can you show me your node --version as well?
node --version v21.3.0
Validate the mongo instance is running
issue has been fixed with new version