langchain-ui icon indicating copy to clipboard operation
langchain-ui copied to clipboard

Npm Run Dev error

Open addy-12 opened this issue 1 year ago • 5 comments

Describe the bug When I am running "npm run dev" - This error pops up, - SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse

Screenshots image

addy-12 avatar Jun 11 '23 15:06 addy-12

Hey! Did you add all the necessary env vars? Also you need to run the backend api.

Furthermore, I'm focusing more on https://github.com/homanp/superagent. The hosted versions is here superagent.sh

homanp avatar Jun 11 '23 17:06 homanp

Same issue as the guy above, this is my env: DATABASE_URL="URL of my database" NEXTAUTH_SECRET="" NEXTAUTH_URL="" NEXT_PUBLIC_GITHUB_ID="" NEXT_PUBLIC_GITHUB_SECRET="" OPENAI_API_KEY="" METAL_API_KEY="" METAL_APP_ID="" METAL_INDEX_ID="" METAL_CLIENT_ID="" NEXT_PUBLIC_AMAZON_S3_BUCKET_NAME="" NEXT_PUBLIC_AMAZON_S3_SECRET_ACCESS_KEY="" NEXT_PUBLIC_AMAZON_S3_ACCESS_KEY_ID="" NEXT_PUBLIC_LANGCHAIN_UI_API_URL=""

I'm running a supabase postgre database, which you failed to mention as a prerequisite. The API is up and running, i checked it, the error pops up when i try to access the site by running the ip in my browser.

Can you be a bit more specific about what else we need to add to .env?

Also another thing, this is the error that pops up when i try to build the project: Failed to compile.

./app/user/login/login.js Module parse failed: Bad character escape sequence (2:99) File was processed with these loaders:

  • ./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js
  • ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js You may need an additional loader to handle the result of these loaders. | import { createProxy } from "next/dist/build/webpack/loaders/next-flight-loader/module-proxy"

const proxy = createProxy("C:\Users\User\Desktop\DSC\work\langchain-ui\langchain-ui\app\user\login\login.js") | | // Accessing the __esModule property and exporting $$typeof are required here.

Import trace for requested module: ./app/user/login/login.js ./app/user/login/page.js

Build failed because of webpack errors

I'd also like a detailed explanation of the 6th 7th and 8th step, are these supposed to be ran in different terminals and should they be running simultaneously along with a terminal running the API? Please be thorough with the explanation and separate the questions and the answers. Thanks in advance.

PavleVidanovic avatar Jun 14 '23 14:06 PavleVidanovic

Hey @PavleVidanovic

This repo needs to be configured as well and ran separately https://github.com/homanp/langchain-ui-api

I'm not actively developing this repo any more so things might be out of date etc. Focusing on building https://github.com/homanp/superagent atm.

homanp avatar Jun 14 '23 14:06 homanp

Thanks for the quick response, also, I think you should put up in readme.md that you're not working on this anymore so people don't waste any time trying to get it working as I have. After all, langchain is getting daily updates now.

PavleVidanovic avatar Jun 14 '23 14:06 PavleVidanovic

Thanks for the quick response, also, I think you should put up in readme.md that you're not working on this anymore so people don't waste any time trying to get it working as I have. After all, langchain is getting daily updates now.

Yes I agree! Will do ASAP

homanp avatar Jun 14 '23 15:06 homanp