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

Fetch Failed Error #192

Open
jaimejim opened this issue Dec 10, 2023 · 1 comment
Open

Fetch Failed Error #192

jaimejim opened this issue Dec 10, 2023 · 1 comment

Comments

@jaimejim
Copy link

jaimejim commented Dec 10, 2023

I am sure this must be a very dumb error, so my apologies for taking your time.

The only edit I have done is creating the .env file.

My laptop:
Model Name: MacBook Pro
Model Identifier: MacBookPro16,2
Processor Name: Quad-Core Intel Core i7
System Version: macOS 14.1 (23B74)
Kernel Version: Darwin 23.1.0

I get this error.

- event compiled successfully in 461 ms (349 modules)
[TypeError: fetch failed] { cause: [Error: AggregateError] }
- error Error: fetch failed
    at context.fetch (/Users/myuser/code/babyagi-ui/node_modules/next/dist/server/web/sandbox/context.js:260:38)
    at fetchJsonFiles (webpack-internal:///(middleware)/./src/utils/objective.ts:23:32)
    at getObjectivesExamples (webpack-internal:///(middleware)/./src/utils/objective.ts:39:36)
    at findMostRelevantObjective (webpack-internal:///(middleware)/./src/utils/objective.ts:63:28)
    at TaskRegistry.createTaskList (webpack-internal:///(middleware)/./src/lib/agents/babyelfagi/registory/taskRegistry.ts:26:116)
    at BabyElfAGI.prepare (webpack-internal:///(middleware)/./src/lib/agents/babyelfagi/executer.ts:29:37)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async BabyElfAGI.run (webpack-internal:///(middleware)/./src/lib/agents/base/AgentExecuter.ts:20:9) {
  name: 'TypeError',
  digest: undefined
}
Error: fetch failed
    at context.fetch (/Users/myuser/code/babyagi-ui/node_modules/next/dist/server/web/sandbox/context.js:260:38)
    at fetchJsonFiles (webpack-internal:///(middleware)/./src/utils/objective.ts:23:32)
    at getObjectivesExamples (webpack-internal:///(middleware)/./src/utils/objective.ts:39:36)
    at findMostRelevantObjective (webpack-internal:///(middleware)/./src/utils/objective.ts:63:28)
    at TaskRegistry.createTaskList (webpack-internal:///(middleware)/./src/lib/agents/babyelfagi/registory/taskRegistry.ts:26:116)
    at BabyElfAGI.prepare (webpack-internal:///(middleware)/./src/lib/agents/babyelfagi/executer.ts:29:37)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async BabyElfAGI.run (webpack-internal:///(middleware)/./src/lib/agents/base/AgentExecuter.ts:20:9) {
  cause: Error: AggregateError
      at makeNetworkError (eval at requireWithFakeGlobalScope (/Users/myuser/code/babyagi-ui/node_modules/next/dist/compiled/edge-runtime/index.js:1:970334), <anonymous>:7294:35)
      at httpNetworkFetch (eval at requireWithFakeGlobalScope (/Users/myuser/code/babyagi-ui/node_modules/next/dist/compiled/edge-runtime/index.js:1:970334), <anonymous>:12040:16)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async httpNetworkOrCacheFetch (eval at requireWithFakeGlobalScope (/Users/myuser/code/babyagi-ui/node_modules/next/dist/compiled/edge-runtime/index.js:1:970334), <anonymous>:11913:33)
      at async httpFetch (eval at requireWithFakeGlobalScope (/Users/myuser/code/babyagi-ui/node_modules/next/dist/compiled/edge-runtime/index.js:1:970334), <anonymous>:11750:37)
      at async schemeFetch (eval at requireWithFakeGlobalScope (/Users/myuser/code/babyagi-ui/node_modules/next/dist/compiled/edge-runtime/index.js:1:970334), <anonymous>:11675:18)
      at async eval (eval at requireWithFakeGlobalScope (/Users/myuser/code/babyagi-ui/node_modules/next/dist/compiled/edge-runtime/index.js:1:970334), <anonymous>:11548:20)
      at async mainFetch (eval at requireWithFakeGlobalScope (/Users/myuser/code/babyagi-ui/node_modules/next/dist/compiled/edge-runtime/index.js:1:970334), <anonymous>:11538:20)
}
- wait compiling /_error (client and server)...
- wait compiling / (client and server)...

I checked that there were no corrupted npm packages, removed node_modules directory and the package-lock.json. After running npm install again it still failed.

@miurla
Copy link
Owner

miurla commented Dec 17, 2023

@jaimejim
Sorry for the late reply.

This error is due to a failure in fetching the json file.
Please check if the BASE_URL in the env file is correctly set.

https://github.com/miurla/babyagi-ui/blob/main/.env.example#L22-L23

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