All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
36.84k stars 4.19k forks source link

[Bug]: Make build fails #5016

Open ryx2 opened 3 days ago

ryx2 commented 3 days ago

Is there an existing issue for the same bug?

Describe the bug and reproduction steps

Cloned a fresh version of the repo, a couple hours ago (nov 14th 2024), did a make build, it errors like the logs show below

My dev setup:

Mac OS 15.1 Docker version 24.0.1, build 680212238b
Python 3.13.0 node v23.1.0 Poetry (version 1.8.4)

OpenHands Installation

Development workflow

OpenHands Version

0.13.1

Operating System

MacOS

Logs, Errors, Screenshots, and Additional Context

> make build          
Building project...
Checking dependencies...
Checking system...
macOS detected.
Checking Python installation...
Python 3.12.7 is already installed.
Checking npm installation...
npm 10.9.0 is already installed.
Checking Node.js installation...
Node.js 23.1.0 is already installed.
Checking Docker installation...
Docker version 24.0.1, build 680212238b is already installed.
Checking Poetry installation...
Poetry (version 1.8.4) is already installed.
Dependencies checked successfully.
Installing Python dependencies...
Defaulting TZ (timezone) to UTC
Recreating virtualenv openhands-ai-rZF88bGC-py3.12 in /Users/raymondxu/Library/Caches/pypoetry/virtualenvs/openhands-ai-rZF88bGC-py3.12
Using virtualenv: /Users/raymondxu/Library/Caches/pypoetry/virtualenvs/openhands-ai-rZF88bGC-py3.12
Installing chroma-hnswlib...
Collecting chroma-hnswlib
  Using cached chroma_hnswlib-0.7.6-cp312-cp312-macosx_11_0_arm64.whl.metadata (252 bytes)
Collecting numpy (from chroma-hnswlib)
  Using cached numpy-2.1.3-cp312-cp312-macosx_14_0_arm64.whl.metadata (62 kB)
Using cached chroma_hnswlib-0.7.6-cp312-cp312-macosx_11_0_arm64.whl (185 kB)
Using cached numpy-2.1.3-cp312-cp312-macosx_14_0_arm64.whl (5.1 MB)
Installing collected packages: numpy, chroma-hnswlib
Successfully installed chroma-hnswlib-0.7.6 numpy-2.1.3
Installing dependencies from lock file

Package operations: 322 installs, 1 update, 0 removals

  - Installing attrs (24.2.0)
  - Installing rpds-py (0.21.0)
  - Installing referencing (0.35.1)
  - Installing six (1.16.0)
  - Installing frozenlist (1.5.0)
  - Installing idna (3.10)
  - Installing jsonschema-specifications (2024.10.1)
  - Installing multidict (6.1.0)
  - Installing platformdirs (4.3.6)
  - Installing propcache (0.2.0)
  - Installing python-dateutil (2.9.0.post0)
  - Installing traitlets (5.14.3)
  - Installing types-python-dateutil (2.9.0.20241003)
  - Installing aiohappyeyeballs (2.4.3)
  - Installing aiosignal (1.3.1)
  - Installing arrow (1.3.0)
  - Installing certifi (2024.8.30)
  - Installing charset-normalizer (3.4.0)
  - Installing fastjsonschema (2.20.0)
  - Installing jsonschema (4.23.0)
  - Installing jupyter-core (5.7.2)
  - Installing pycparser (2.22)
  - Installing pyzmq (26.2.0)
  - Installing tornado (6.4.1)
  - Installing urllib3 (2.2.3)
  - Installing yarl (1.17.1)
  - Installing packaging (24.2)
  - Installing fqdn (1.5.1)
  - Installing fsspec (2024.9.0)
  - Installing h11 (0.14.0)
  - Installing isoduration (20.11.0)
  - Installing jsonpointer (3.0.0)
  - Installing jupyter-client (8.6.3)
  - Installing markupsafe (3.0.2)
  - Installing nbformat (5.10.4)
  - Downgrading numpy (2.1.3 -> 1.26.4)
  - Installing aiohttp (3.10.10)
  - Installing cffi (1.17.1)
  - Installing filelock (3.16.1)
  - Installing dill (0.3.8)
  - Installing ptyprocess (0.7.0)
  - Installing pyasn1 (0.6.1)
  - Installing pytz (2024.2)
  - Installing pyyaml (6.0.2)
  - Installing requests (2.32.3)
  - Installing rfc3339-validator (0.1.4)
  - Installing rfc3986-validator (0.1.1)
  - Installing sniffio (1.3.1)
  - Installing soupsieve (2.6)
  - Installing tqdm (4.67.0)
  - Installing typing-extensions (4.12.2)
  - Installing tzdata (2024.2)
  - Installing uri-template (1.3.0)
  - Installing webcolors (24.8.0)
  - Installing webencodings (0.5.1)
  - Installing annotated-types (0.7.0)
  - Installing anyio (4.6.2.post1)
  - Installing argon2-cffi-bindings (21.2.0)
  - Installing asttokens (2.4.1)
  - Installing beautifulsoup4 (4.12.3)
  - Installing bleach (6.2.0)
  - Installing cachetools (5.5.0)
  - Installing defusedxml (0.7.1)
  - Installing executing (2.1.0)
  - Installing httpcore (1.0.6)
  - Installing huggingface-hub (0.26.2)
  - Installing jinja2 (3.1.4)
  - Installing jupyterlab-pygments (0.3.0)
  - Installing mistune (3.0.2)
  - Installing multiprocess (0.70.16)
  - Installing nbclient (0.10.0)
  - Installing pandas (2.2.3)
  - Installing pandocfilters (1.5.1)
  - Installing parso (0.8.4)
  - Installing pillow (11.0.0)
  - Installing protobuf (4.25.5)
  - Installing pure-eval (0.2.3)
  - Installing pyarrow (17.0.0)
  - Installing pyasn1-modules (0.4.1)
  - Installing pydantic-core (2.23.4)
  - Installing pygments (2.18.0)
  - Installing python-json-logger (2.0.7)
  - Installing rsa (4.9)
  - Installing terminado (0.18.1)
  - Installing tinycss2 (1.4.0)
  - Installing wcwidth (0.2.13)
  - Installing wrapt (1.16.0)
  - Installing xxhash (3.5.0)
  - Installing zipp (3.20.2)
  - Installing argon2-cffi (23.1.0)
  - Installing blinker (1.9.0)
  - Installing click (8.1.7)
  - Installing cloudpickle (3.1.0)
  - Installing datasets (3.1.0)
  - Installing decorator (5.1.1)
  - Installing deprecated (1.2.14)
  - Installing distro (1.9.0)
  - Installing farama-notifications (0.0.4)
  - Installing google-auth (2.36.0)
  - Installing googleapis-common-protos (1.65.0)
  - Installing greenlet (3.0.0)
  - Installing grpcio (1.67.1)
  - Installing httpx (0.27.2)
  - Installing importlib-metadata (7.1.0)
  - Installing imageio (2.36.0)
  - Installing jedi (0.19.1)
  - Installing itsdangerous (2.2.0)
  - Installing jiter (0.7.0)
  - Installing joblib (1.4.2)
  - Installing jupyter-events (0.10.0)
  - Installing jupyter-server-terminals (0.5.3)
  - Installing lazy-loader (0.4)
  - Installing matplotlib-inline (0.1.7)
  - Installing mdurl (0.1.2)
  - Installing mypy-extensions (1.0.0)
  - Installing nbconvert (7.16.4)
  - Installing networkx (3.4.2)
  - Installing overrides (7.7.0)
  - Installing prometheus-client (0.21.0)
  - Installing pexpect (4.9.0)
  - Installing prompt-toolkit (3.0.48)
  - Installing proto-plus (1.25.0)
  - Installing pydantic (2.9.2)
  - Installing pyee (11.0.1)
  - Installing pyparsing (3.2.0)
  - Installing regex (2024.11.6)
  - Installing safetensors (0.4.5)
  - Installing scipy (1.14.1)
  - Installing send2trash (1.8.3)
  - Installing stack-data (0.6.3)
  - Installing tifffile (2024.9.20)
  - Installing tokenizers (0.20.3)
  - Installing websocket-client (1.8.0)
  - Installing werkzeug (3.1.3)
  - Installing aiolimiter (1.1.0)
  - Installing beartype (0.12.0)
  - Installing appnope (0.1.4)
  - Installing debugpy (1.8.8)
  - Installing evaluate (0.4.3)
  - Installing distlib (0.3.9)
  - Installing comm (0.2.2)
  - Installing flask (3.0.3)
  - Installing google-crc32c (1.6.0)
  - Installing grpcio-status (1.62.3)
  - Installing hpack (4.0.0)
  - Installing google-api-core (2.22.0)
  - Installing gymnasium (1.0.0)
  - Installing babel (2.16.0)
  - Installing httplib2 (0.22.0)
  - Installing hyperframe (6.0.1)
  - Installing ipython (8.29.0)
  - Installing jmespath (1.0.1)
  - Installing json5 (0.9.25)
  - Installing jupyter-server (2.14.2)
  - Installing lxml (5.3.0)
  - Installing markdown-it-py (3.0.0)
  - Installing marshmallow (3.23.1)
  - Installing nest-asyncio (1.6.0)
  - Installing nltk (3.9.1)
  - Installing openai (1.54.3)
  - Installing opentelemetry-api (1.25.0)
  - Installing playwright (1.39.0)
  - Installing psutil (6.1.0)
  - Installing scikit-image (0.24.0)
  - Installing smmap (5.0.1)
  - Installing text-generation (0.7.0)
  - Installing tiktoken (0.8.0)
  - Installing transformers (4.46.2)
  - Installing tree-sitter (0.21.3)
  - Installing types-tqdm (4.66.0.20240417)
  - Installing typing-inspect (0.9.0)
  - Installing async-lru (2.0.4)
  - Installing botocore (1.35.57)
  - Installing browsergym-core (0.10.2)
  - Installing cfgv (3.4.0)
  - Installing contourpy (1.3.0)
  - Installing cryptography (43.0.3)
  - Installing cycler (0.12.1)
  - Installing dataclasses-json (0.6.7)
  - Installing english-words (2.0.1)
  - Installing faker (30.8.2)
  - Installing fastcore (1.7.19)
  - Installing fonttools (4.54.1)
  - Installing gitdb (4.0.11)
  - Installing google-auth-httplib2 (0.2.0)
  - Installing google-resumable-media (2.7.2)
  - Installing google-cloud-core (2.4.1)
  - Installing grpc-google-iam-v1 (0.13.1)
  - Installing h2 (4.1.0)
  - Installing identify (2.6.1)
  - Installing iniconfig (2.0.0)
  - Installing ipykernel (6.29.5)
  - Installing jupyter-lsp (2.2.5)
  - Installing jupyterlab-server (2.27.3)
  - Installing kiwisolver (1.4.7)
  - Installing libvisualwebarena (0.0.14)
  - Installing libwebarena (0.0.3)
  - Installing narwhals (1.13.3)
  - Installing nodeenv (1.9.1)
  - Installing notebook-shim (0.2.4)
  - Installing oauthlib (3.2.2)
  - Installing opentelemetry-proto (1.25.0)
  - Installing opentelemetry-semantic-conventions (0.46b0)
  - Installing pathspec (0.12.1)
  - Installing pluggy (1.5.0)
  - Installing pysocks (1.7.1)
  - Installing python-dotenv (1.0.1)
  - Installing rich (13.9.4)
  - Installing setuptools (75.3.0)
  - Installing shellingham (1.5.4)
  - Installing sigtools (4.0.1)
  - Installing starlette (0.41.2)
  - Installing tenacity (8.5.0)
  - Installing tree-sitter-languages (1.10.2)
  - Installing uritemplate (4.1.1)
  - Installing virtualenv (20.27.1)
  - Installing aenum (3.1.15)
  - Installing aiostream (0.5.2)
  - Installing altair (5.4.1)
  - Installing browsergym-assistantbench (0.10.2)
  - Installing browsergym-experiments (0.10.2)
  - Installing browsergym-miniwob (0.10.2)
  - Installing browsergym-visualwebarena (0.10.2)
  - Installing browsergym-webarena (0.10.2)
  - Installing browsergym-workarena (0.4.1): Installing...
  - Installing chardet (5.2.0)
  - Installing coverage (7.6.4)
  - Installing diskcache (5.6.3)
  - Installing docker (7.1.0)
  - Installing chardet (5.2.0)
  - Installing coverage (7.6.4)
  - Installing diskcache (5.6.3)
  - Installing docker (7.1.0)
  - Installing browsergym-workarena (0.4.1)
  - Installing chardet (5.2.0)
  - Installing coverage (7.6.4)
  - Installing diskcache (5.6.3)
  - Installing docker (7.1.0)
  - Installing docstring-parser (0.16)
  - Installing execnet (2.1.1)
  - Installing fastapi (0.115.4)
  - Installing ghapi (1.0.6)
  - Installing gitpython (3.1.43)
  - Installing google-ai-generativelanguage (0.6.10)
  - Installing google-api-python-client (2.151.0)
  - Installing google-cloud-bigquery (3.26.0)
  - Installing google-cloud-resource-manager (1.13.0)
  - Installing google-cloud-storage (2.18.2)
  - Installing grep-ast (0.3.3)
  - Installing grpclib (0.4.7)
  - Installing jsonrpcclient (4.0.3)
  - Installing jupyterlab (4.3.0)
  - Installing litellm (1.52.5)
  - Installing matplotlib (3.9.2)
  - Installing mccabe (0.7.0)
  - Installing mpmath (1.3.0)
  - Installing opentelemetry-exporter-otlp-proto-common (1.25.0)
  - Installing opentelemetry-sdk (1.25.0)
  - Installing pre-commit (4.0.1)
  - Installing py (1.11.0)
  - Installing pybind11 (2.13.6)
  - Installing pycodestyle (2.12.1)
  - Installing pycryptodome (3.21.0)
  - Installing pydeck (0.9.1)
  - Installing pyflakes (3.2.0)
  - Installing pyjwt (2.9.0)
  - Installing pynacl (1.5.0)
  - Installing pyproject-hooks (1.2.0)
  - Installing pytest (8.3.3)
  - Installing requests-oauthlib (2.0.0)
  - Installing s3transfer (0.10.3)
  - Installing scantree (0.0.4)
  - Installing shapely (2.0.6)
  - Installing synchronicity (0.8.3)
  - Installing toml (0.10.2)
  - Installing typer (0.13.0)
  - Installing types-certifi (2021.10.8.3)
  - Installing types-toml (0.10.8.20240310)
  - Installing unidiff (0.7.5)
  - Installing watchfiles (0.24.0)
  - Installing websockets (13.1)
  - Installing xlsxwriter (3.2.0)
  - Installing zope-event (5.0)
  - Installing zope-interface (7.1.1)
  - Installing anthropic (0.39.0)
  - Installing bashlex (0.18)
  - Installing boto3 (1.35.57)
  - Installing browsergym (0.10.2)
  - Installing build (1.2.2.post1)
  - Installing dirhash (0.5.0)
  - Installing e2b (0.17.1)
  - Installing flake8 (7.1.1)
  - Installing func-timeout (4.3.5)
  - Installing gdown (5.2.0)
  - Installing gevent (24.2.1)
  - Installing google-auth-oauthlib (1.2.1)
  - Installing google-cloud-aiplatform (1.71.1)
  - Installing google-generativeai (0.8.3)
  - Installing html2text (2024.2.26)
  - Installing json-repair (0.30.1)
  - Installing jupyter-kernel-gateway (3.0.1)
  - Installing minio (7.2.10)
  - Installing modal (0.64.235)
  - Installing mypy (1.13.0)
  - Installing notebook (7.0.7)
  - Installing opencv-python (4.10.0.84)
  - Installing openhands-aci (0.1.0)
  - Installing opentelemetry-exporter-otlp-proto-grpc (1.25.0)
  - Installing pygithub (2.5.0)
  - Installing pylatexenc (2.10)
  - Installing pylcs (0.1.1)
  - Installing pypdf2 (3.0.1)
  - Installing pytest-asyncio (0.24.0)
  - Installing pytest-cov (6.0.0)
  - Installing pytest-forked (1.6.0)
  - Installing pytest-xdist (3.6.1)
  - Installing python-docx (1.1.2)
  - Installing python-frontmatter (1.1.0)
  - Installing python-multipart (0.0.17)
  - Installing python-pptx (1.0.2)
  - Installing reportlab (4.2.5)
  - Installing retry (0.9.2)
  - Installing ruff (0.7.1)
  - Installing runloop-api-client (0.7.0)
  - Installing seaborn (0.13.2)
  - Installing streamlit (1.40.0)
  - Installing swebench (2.0.13 c807c11)
  - Installing sympy (1.13.1)
  - Installing tabulate (0.9.0)
  - Installing termcolor (2.5.0)
  - Installing uvicorn (0.32.0)
  - Installing whatthepatch (1.0.6)

Installing the current project: openhands-ai (0.13.1)
Running playwright install --with-deps chromium...
Python dependencies installed successfully.
Setting up frontend environment...
Detect Node.js version...
Current Node.js version is 23.1.0, corepack is supported.
Installing frontend dependencies with npm...
(node:87168) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.

> openhands-frontend@0.13.1 prepare
> cd .. && husky frontend/.husky

added 1796 packages, and audited 1797 packages in 8s

402 packages are looking for funding
  run `npm fund` for details

9 low severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
Frontend dependencies installed successfully.
Installing pre-commit hooks...
pre-commit installed at .git/hooks/pre-commit
Pre-commit hooks installed successfully.
Building frontend...

> openhands-frontend@0.13.1 build
> npm run make-i18n && tsc && remix vite:build

> openhands-frontend@0.13.1 make-i18n
> node scripts/make-i18n-translations.cjs

✔ Console Ninja extension is connected to Remix, see https://tinyurl.com/2vt8jxzw
vite v5.4.9 building for production...
transforming (32) src/routes/_oh._index/route.tsx(node:87370) ExperimentalWarning: CommonJS module /Users/raymondxu/OpenHands/frontend/node_modules/tailwindcss/lib/lib/load-config.js is loading ES Module /Users/raymondxu/OpenHands/frontend/tailwind.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
file:///Users/raymondxu/OpenHands/frontend/tailwind.config.js:2
const { nextui } = require("@nextui-org/react");
                   ^

ReferenceError: require is not defined
    at file:///Users/raymondxu/OpenHands/frontend/tailwind.config.js:2:20
    at ModuleJobSync.runSync (node:internal/modules/esm/module_job:367:35)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:325:47)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1396:24)
    at Module._compile (node:internal/modules/cjs/loader:1529:5)
    at Object..js (node:internal/modules/cjs/loader:1678:16)
    at Module.load (node:internal/modules/cjs/loader:1315:32)
    at Function._load (node:internal/modules/cjs/loader:1125:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:216:24)

Node.js v23.1.0
make[1]: *** [build-frontend] Error 1
make: *** [build] Error 2
mamoodi commented 2 days ago

I think I've seen this before somewhere. Double check that your python version is 3.12.

Try downgrading Node to 20.X.X. I have 20.13.1. I think the newer NodeJS doesn't work with this project.

mamoodi commented 2 days ago

@amanape if there is a higher limit to the NodeJS version, we should update the documentation to specify that: https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md

amanape commented 2 days ago

You should use Node's stable release (currently v22.11.0) instead of the latest. You can use a Node version management package like n if you need specific Node versions for different projects (e.g., running n stable will install the stable release).