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

Npm Run Dev error #100

Open
addy-12 opened this issue Jun 11, 2023 · 5 comments
Open

Npm Run Dev error #100

addy-12 opened this issue Jun 11, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@addy-12
Copy link

addy-12 commented Jun 11, 2023

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 addy-12 added the bug Something isn't working label Jun 11, 2023
@homanp
Copy link
Owner

homanp commented Jun 11, 2023

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

@PavleVidanovic
Copy link

PavleVidanovic commented Jun 14, 2023

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.

@homanp
Copy link
Owner

homanp commented Jun 14, 2023

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.

@PavleVidanovic
Copy link

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.

@homanp
Copy link
Owner

homanp commented Jun 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants