TransformerOptimus / SuperAGI

<⚡️> SuperAGI - A dev-first open source autonomous AI agent framework. Enabling developers to build, manage & run useful autonomous agents quickly and reliably.
https://superagi.com/
MIT License
15.22k stars 1.83k forks source link

MacOS: fails to install - Module not found: Can't resolve 'react-markdown' #517

Closed Stooovie closed 1 year ago

Stooovie commented 1 year ago

After getting stuck on "Initializing SuperAGI" on MacOS and various different errors on various Linux distros, I have now deleted everything and started from scratch, but the initial setup (docker-compose up --build) fails with

`Error: Module not found: Can't resolve 'react-markdown' 8 | import {fetchToolTemplateOverview, installToolkitTemplate} from "@/pages/api/DashboardService"; 9 | import {EventBus} from "@/utils/eventBus";

10 | import ReactMarkdown from 'react-markdown'; 11 | import axios from 'axios'; 12 | 13 | export default function EachTool({template, env}) {

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module: ./pages/Content/Marketplace/Market.js ./pages/Dashboard/Content.js ./pages/_app.js`

My Docker: Client: Cloud integration: v1.0.33 Version: 24.0.2 API version: 1.43 Go version: go1.20.4 Git commit: cb74dfc Built: Thu May 25 21:51:16 2023 OS/Arch: darwin/arm64 Context: desktop-linux

Server: Docker Desktop 4.20.1 (110738) Engine: Version: 24.0.2 API version: 1.43 (minimum version 1.12) Go version: go1.20.4 Git commit: 659604f Built: Thu May 25 21:50:59 2023 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.21 GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8 runc: Version: 1.1.7 GitCommit: v1.1.7-0-g860f061 docker-init: Version: 0.19.0 GitCommit: de40ad0

Stooovie commented 1 year ago

Running npm install react-markdown doesn't fix. My package.json is { "dependencies": { "axios": "^1.4.0", "react-markdown": "^8.0.7", "react-toastify": "^9.1.3" } } and running "npm install" returns no errors but still, the erorr message above persists.

Stooovie commented 1 year ago

SOLUTION: fixed by not using the git command from the instructions and manually downloading the source code zip instead.

And then getting stuck on "Initializing SuperAGI" anyway, with this: superagi-proxy-1 | 2023/06/27 09:50:50 [error] 33#33: *78 connect() failed (111: Connection refused) while connecting to upstream, client: 172.19.0.1, server: , request: "GET /api/configs/get/env HTTP/1.1", upstream: "http://172.19.0.5:8001/configs/get/env", host: "localhost:3000", referrer: "http://localhost:3000/"

Agnosaru commented 1 year ago

Thanks for looking into this Stoovie, I am getting the same original error.

Just doing a full docker compose with the missing line added in the package.json.

Stooovie commented 1 year ago

but the line was never missing. it was always there and yet i was getting the error

neelayan7 commented 1 year ago

We are looking into this urgently. Thanks for calling this out!

imdt54 commented 1 year ago

Having the same issue on Mac after pulling the latest from Master.
Screenshot 2023-06-27 at 10 26 52 AM

TransformerOptimus commented 1 year ago

This was happening because the node_modules were not refreshing in the docker mounted volume for /app/node_modules. Removed the mounted volume for gui. PR: https://github.com/TransformerOptimus/SuperAGI/pull/527

Can you please pull in the latest main it should work fine now.

Agnosaru commented 1 year ago

Yes! It is now working for me, at least! Thank you.

Stooovie commented 1 year ago

Hey, finally it installs and works fine on MacOS for me! thanks!

neelayan7 commented 1 year ago

Closing this issue as this is resolved. Please re-open if you feel it's incomplete or if you have a better solution in mind and want to discuss.