OpenHands
OpenHands copied to clipboard
Make `make` fail with a good error message when npm or python have incompatible versions
Summary
Windows 11 WSL2 Ubuntu 20.04
System:~/OpenDevin$ make build Building project... Pulling Docker image... Using default tag: latest latest: Pulling from opendevin/sandbox Digest: sha256:486e3da1d7c8ec54a2e3269071eed9b91bc75b82ca5d1ac1760d33883c39e575 Status: Image is up to date for ghcr.io/opendevin/sandbox:latest ghcr.io/opendevin/sandbox:latest
What's Next? View a summary of image vulnerabilities and recommendations → docker scout quickview ghcr.io/opendevin/sandbox Installing Python dependencies... make: python: No such file or directory make: *** [Makefile:17: build] Error 127
Is Python in your PATH? What is the output of python --version?
@abhawan888 this version of makefiel will be outdated we fixed all the issues in this PR #378 waiting just for the merge also you should have python 3.11 as version to build the project
@dorbanianas Thanks! I have a fresh install and everything is the latest version. I'll keep an eye out for the merge. Really excited to give this a try.
@abhawan888 Sure it's just a matter of time 😉
im new using ubuntu how can i use the command make to install OpenDevin? i don't quite understand what to do or how command "make" works
@Jaitwo you can simply follow the steps in the readme and how make works just you define a file named Makefile where you give some shortcuts like build, install... Where the users of the project can run a lot of these commands using just the shortcut that you have defined, this is my definition of course to make it simple for you, Now how you can use it? just you need to go to the linux terminal and type make build to build the venv and install the dependencies, after that use make setup-config to setup your model config and finally make run to run the full project, you may encounter so bugs but we are working to fix them asap.
edit "makefile" replace all "python" with "python3"
edit "makefile" replace all "python" with "python3"
make build is so far working, thank you.
edit "makefile" replace all "python" with "python3"
make build is so far working, thank you.
Setting up frontend environment... /bin/sh: 1: npm: not found make: *** [Makefile:21: build] Error 127
back to square one I guess....
okay so I also had to install npm in the environment itself
and it didn't make a difference.
ERROR: Failed connection to server. Please ensure the server is reachable at ws://127.0.0.1:3001/ws.
@rbren @neubig what do you think about including the installation of python3.11 and npm in the make build?
installing a full programming language is kind of aggressive for make 😅
IMO make shouldn't have system-wide side-effects, as much as possible
Can we fail the make with a good error message if npm or python isn't installed or on an old version?
Most of the compatibility work is done in the Makefile at https://github.com/OpenDevin/OpenDevin/pull/650
Regarding the node and npm version inspection, I believe it has been implemented in https://github.com/OpenDevin/OpenDevin/pull/659
@rbren we can run the process in the background and show some good looking messages and wait for it until it finishes
But I guess for now maybe it's not necessary because it will add more complexity and edge cases to handle that we are not supposed to think of right now
now we handle check for python, npm, docker and for the pnpm if npm is installed the pnpm get enabled also added some styling 😅, more details here #634