I have somehow fixed the issue although I’m not sure exactly what is happening.
This is a conda env (just for python) and poetry.
the conda env looks like:
name: reflex-dash
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.12.3
When running reflex run
for the first time there are a few warnings about certificates being out of date (for tailwind
and others), that’s what those bun
errors are.
(base) [pedro.neto@ampt-prod-2-login-1 pedro.neto]$ git clone git@ssh.dev.azure.com:v3/AstonMartinF1/AMPT/ampt-cfd-azure-dashboard
Cloning into 'ampt-cfd-azure-dashboard'...
remote: Azure Repos
remote: Found 287 objects to send. (201 ms)
Receiving objects: 100% (287/287), 263.37 KiB | 654.00 KiB/s, done.
Resolving deltas: 100% (135/135), done.
(base) [pedro.neto@ampt-prod-2-login-1 pedro.neto]$ cd ampt-cfd-azure-dashboard/
(base) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ git checkout reflex
branch 'reflex' set up to track 'origin/reflex'.
Switched to a new branch 'reflex'
(base) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ mamba env create -f environment.yml
Channels:
- conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 24.11.2
latest version: 24.11.3
Please update conda by running
$ conda update -n base -c conda-forge conda
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate reflex-dash
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ conda activate reflex-dash
(reflex-dash) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ poetry install --no-root
Installing dependencies from lock file
Package operations: 63 installs, 32 updates, 0 removals
- Updating pip (24.3.1 /home/conda/feedstock_root/build_artifacts/pip_1734466212593/work -> 24.3.1)
- Updating pycparser (2.22 /home/conda/feedstock_root/build_artifacts/bld/rattler-build_pycparser_1733195786/work -> 2.22)
- Updating cffi (1.17.1 /home/conda/feedstock_root/build_artifacts/cffi_1725560558132/work -> 1.17.1)
- Installing h11 (0.14.0)
- Installing mdurl (0.1.2)
- Downgrading certifi (2024.12.14 /home/conda/feedstock_root/build_artifacts/certifi_1734380492396/work/certifi -> 2024.8.30)
- Downgrading charset-normalizer (3.4.1 /home/conda/feedstock_root/build_artifacts/charset-normalizer_1735929714516/work -> 3.4.0)
- Downgrading cryptography (44.0.0 /home/conda/feedstock_root/build_artifacts/cryptography-split_1732745930545/work -> 43.0.3)
- Updating idna (3.10 /home/conda/feedstock_root/build_artifacts/idna_1733211830134/work -> 3.10)
- Updating jeepney (0.8.0 /home/conda/feedstock_root/build_artifacts/jeepney_1649085214306/work -> 0.8.0)
- Installing markdown-it-py (3.0.0)
- Updating more-itertools (10.5.0 /home/conda/feedstock_root/build_artifacts/more-itertools_1733662565615/work -> 10.5.0)
- Installing pygments (2.18.0)
- Installing sniffio (1.3.1)
- Updating typing-extensions (4.12.2 /home/conda/feedstock_root/build_artifacts/typing_extensions_1733188668063/work -> 4.12.2)
- Updating urllib3 (1.26.19 /home/conda/feedstock_root/build_artifacts/urllib3_1718728347128/work -> 2.2.3)
- Installing wsproto (1.2.0)
- Updating annotated-types (0.7.0 /home/conda/feedstock_root/build_artifacts/annotated-types_1733247046149/work -> 0.7.0)
- Installing anyio (4.6.2.post1)
- Downgrading click (8.1.8 /home/conda/feedstock_root/build_artifacts/click_1734858813237/work -> 8.1.7)
- Installing docutils (0.21.2)
- Installing greenlet (3.1.1)
- Installing httpcore (1.0.7)
- Updating jaraco-classes (3.4.0 /home/conda/feedstock_root/build_artifacts/jaraco.classes_1733325873251/work -> 3.4.0)
- Updating jaraco-context (6.0.1 /home/conda/feedstock_root/build_artifacts/jaraco.context_1733382590553/work -> 6.0.1)
- Updating jaraco-functools (4.1.0 /home/conda/feedstock_root/build_artifacts/jaraco.functools_1733746366381/work -> 4.1.0)
- Updating markupsafe (3.0.2 /home/conda/feedstock_root/build_artifacts/markupsafe_1733219680183/work -> 3.0.2)
- Installing nh3 (0.2.18)
- Downgrading pydantic-core (2.27.2 /home/conda/feedstock_root/build_artifacts/pydantic-core_1734571528486/work -> 2.27.0)
- Updating requests (2.32.3 /home/conda/feedstock_root/build_artifacts/requests_1733217035951/work -> 2.32.3)
- Installing rich (13.9.4)
- Updating secretstorage (3.3.3 /home/conda/feedstock_root/build_artifacts/secretstorage_1725915615986/work -> 3.3.3)
- Installing shellingham (1.5.4)
- Installing simple-websocket (1.1.0)
- Downgrading six (1.17.0 /home/conda/feedstock_root/build_artifacts/six_1733380938961/work -> 1.16.0)
- Updating zipp (3.21.0 /home/conda/feedstock_root/build_artifacts/zipp_1732827521216/work -> 3.21.0)
- Installing bidict (0.23.1)
- Installing httpx (0.27.2)
- Updating importlib-metadata (8.5.0 /home/conda/feedstock_root/build_artifacts/importlib-metadata_1733223117029/work -> 8.5.0)
- Downgrading jinja2 (3.1.5 /home/conda/feedstock_root/build_artifacts/jinja2_1734823942230/work -> 3.1.4)
- Downgrading keyring (25.6.0 /home/conda/feedstock_root/build_artifacts/keyring_1735210185992/work -> 25.5.0)
- Installing mako (1.3.6)
- Installing numpy (1.26.4)
- Updating packaging (24.2 /home/conda/feedstock_root/build_artifacts/packaging_1733203243479/work -> 24.2)
- Installing pipdeptree (2.16.2)
- Downgrading pkginfo (1.12.0 /home/conda/feedstock_root/build_artifacts/pkginfo_1733734533957/work -> 1.10.0)
- Updating platformdirs (4.3.6 /home/conda/feedstock_root/build_artifacts/platformdirs_1733232627818/work -> 4.3.6)
- Downgrading pydantic (2.10.5 /home/conda/feedstock_root/build_artifacts/pydantic_1736458246045/work -> 2.10.0)
- Installing pyproject-hooks (1.2.0)
- Installing python-dateutil (2.9.0.post0)
- Installing python-engineio (4.10.1)
- Installing python-multipart (0.0.17)
- Installing readme-renderer (44.0)
- Installing requests-toolbelt (1.0.0)
- Installing rfc3986 (2.0.0)
- Installing sqlalchemy (2.0.36)
- Installing starlette (0.41.3)
- Installing tabulate (0.9.0)
- Installing typer (0.13.1)
- Installing websockets (14.1)
- Installing alembic (1.14.0)
- Installing build (1.2.2.post1)
- Installing contourpy (1.3.1)
- Installing cycler (0.12.1)
- Installing distro (1.9.0)
- Installing fastapi (0.115.5)
- Installing fonttools (4.55.0): Installing...
- Installing gunicorn (23.0.0)
- Installing fonttools (4.55.0)
- Installing gunicorn (23.0.0)
- Installing kiwisolver (1.4.7)
- Installing lazy-loader (0.4)
- Installing pillow (11.0.0)
- Installing psutil (6.1.0)
- Installing pyjwt (2.10.0)
- Installing pyparsing (3.2.0)
- Installing python-socketio (5.11.4)
- Installing pytz (2024.2)
- Installing redis (5.2.0)
- Installing reflex-chakra (0.6.2)
- Installing reflex-hosting-cli (0.1.16)
- Downgrading setuptools (75.8.0 -> 75.6.0)
- Installing sqlmodel (0.0.22)
- Installing starlette-admin (0.14.1)
- Updating tomlkit (0.13.2 /home/conda/feedstock_root/build_artifacts/tomlkit_1733230743009/work -> 0.13.2)
- Installing twine (5.1.1)
- Installing tzdata (2024.2)
- Installing uvicorn (0.32.1)
- Downgrading wheel (0.45.1 -> 0.45.0)
- Installing wrapt (1.16.0)
- Installing ampt-slurm-libraries (2.0.4.1)
- Installing cfdlib (1.1.1.dev10)
- Installing matplotlib (3.9.2)
- Installing msal (1.31.1)
- Installing pandas (2.2.2)
- Installing reflex (0.6.5)
- Installing sentry-sdk (2.18.0)
(reflex-dash) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ reflex db migrate
(reflex-dash) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ reflex run
───────────────────── Initializing azure_dash ─────────────────────
Warning: Your version (0.6.5) of reflex is out of date. Upgrade to
0.6.8 with 'pip install reflex --upgrade'
[11:30:37] Initializing the web directory. console.py:104
Success: Initialized azure_dash
─────────────────────── Starting Reflex App ───────────────────────
Warning: Your version (0.6.5) of reflex is out of date. Upgrade to
0.6.8 with 'pip install reflex --upgrade'
[11:30:47] Compiling: ━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 14/14 0:00:00
Warning: There was an error running command:
['/shared/home/pedro.neto/.local/share/reflex/bun/bin/bun',
'install']. Falling back to:
['/shared/home/pedro.neto/.local/share/reflex/fnm/node-versions/v22
.11.0/installation/lib/node_modules/npm/bin/npm-cli.js',
'install'].
Warning: There was an error running command:
['/shared/home/pedro.neto/.local/share/reflex/bun/bin/bun', 'add',
'-d', 'tailwindcss@3.4.14', '@tailwindcss/typography']. Falling
back to:
['/shared/home/pedro.neto/.local/share/reflex/fnm/node-versions/v22
.11.0/installation/lib/node_modules/npm/bin/npm-cli.js', 'add',
'-d', 'tailwindcss@3.4.14', '@tailwindcss/typography'].
Warning: There was an error running command:
['/shared/home/pedro.neto/.local/share/reflex/bun/bin/bun', 'add',
'@radix-ui/react-form@^0.1.0', '@emotion/react@^11.11.1',
'sonner@1.5.0', '@chakra-ui/system@2.5.7', 'react-error-boundary',
'lucide-react@0.359.0', '@chakra-ui/react@2.6.1',
'@radix-ui/themes@^3.0.0 && <3.1.5', 'framer-motion@10.16.4'].
Falling back to:
['/shared/home/pedro.neto/.local/share/reflex/fnm/node-versions/v22
.11.0/installation/lib/node_modules/npm/bin/npm-cli.js', 'add',
'@radix-ui/react-form@^0.1.0', '@emotion/react@^11.11.1',
'sonner@1.5.0', '@chakra-ui/system@2.5.7', 'react-error-boundary',
'lucide-react@0.359.0', '@chakra-ui/react@2.6.1',
'@radix-ui/themes@^3.0.0 && <3.1.5', 'framer-motion@10.16.4'].
─────────────────────────── App Running ───────────────────────────
Starting frontend failed with exit code 1
> dev
> next dev
node:internal/modules/cjs/loader:1252
throw err;
^
Error: Cannot find module 'next/dist/compiled/semver'
Require stack:
-
/scratch/pedro.neto/ampt-cfd-azure-dashboard/.web/node_modules/next
/dist/bin/next
at Function.<anonymous>
(node:internal/modules/cjs/loader:1249:15)
at
/scratch/pedro.neto/ampt-cfd-azure-dashboard/.web/node_modules/next
/dist/server/require-hook.js:55:36
at Function._load (node:internal/modules/cjs/loader:1075:27)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Module.<anonymous>
(node:internal/modules/cjs/loader:1340:12)
at mod.require
(/scratch/pedro.neto/ampt-cfd-azure-dashboard/.web/node_modules/nex
t/dist/server/require-hook.js:65:28)
at require (node:internal/modules/helpers:141:16)
at Object.<anonymous>
(/scratch/pedro.neto/ampt-cfd-azure-dashboard/.web/node_modules/nex
t/dist/bin/next:9:56)
at Module._compile (node:internal/modules/cjs/loader:1546:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/scratch/pedro.neto/ampt-cfd-azure-dashboard/.web/node_modules
/next/dist/bin/next'
]
}
Node.js v22.11.0
Run with --loglevel debug for the full log.
^C[11:33:11] Reflex app stopped. console.py:104
Then finally installing next
fixes the issue…
(reflex-dash) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ mamba install conda-forge::nodejs conda-forge::npx
Looking for: ['conda-forge::nodejs', 'conda-forge::npx']
warning libmamba Cache file "/scratch/pedro.neto/conda/pkgs/cache/497deca9.json" was modified by another program
warning libmamba Cache file "/scratch/pedro.neto/conda/pkgs/cache/09cdf8bf.json" was modified by another program
warning libmamba Cache file "/scratch/pedro.neto/conda/pkgs/cache/497deca9.json" was modified by another program
warning libmamba Cache file "/scratch/pedro.neto/conda/pkgs/cache/09cdf8bf.json" was modified by another program
pkgs/main/noarch No change
pkgs/main/linux-64 No change
pkgs/r/noarch No change
pkgs/r/linux-64 No change
conda-forge/noarch @ 11.8MB/s 1.3s
conda-forge/noarch @ 11.2MB/s 1.4s
conda-forge/linux-64 1.9s
conda-forge/linux-64 @ 18.7MB/s 2.0s
Pinned packages:
- python 3.12.*
Transaction
Prefix: /scratch/pedro.neto/conda/envs/reflex-dash
Updating specs:
- conda-forge::nodejs
- conda-forge::npx
- ca-certificates
- certifi
- openssl
Package Version Build Channel Size
──────────────────────────────────────────────────────────────────────────
Install:
──────────────────────────────────────────────────────────────────────────
+ blas 1.0 openblas pkgs/main Cached
+ libgfortran5 11.2.0 h1234567_1 pkgs/main Cached
+ libgfortran-ng 11.2.0 h00389a5_1 pkgs/main Cached
+ zlib 1.3.1 hb9d3cd8_2 conda-forge Cached
+ libuv 1.49.2 hb9d3cd8_0 conda-forge Cached
+ libstdcxx-ng 14.2.0 h4852527_1 conda-forge Cached
+ icu 75.1 he02047a_0 conda-forge Cached
+ nodejs 22.12.0 hf235a45_0 conda-forge Cached
+ libopenblas 0.3.21 h043d6bf_0 pkgs/main Cached
+ numpy-base 2.0.1 py312he1a6c75_1 pkgs/main Cached
+ numpy 2.0.1 py312h2809609_1 pkgs/main Cached
+ npx 0.1.1 pyhd8ed1ab_0 conda-forge Cached
Upgrade:
──────────────────────────────────────────────────────────────────────────
- ca-certificates 2024.12.14 hbcca054_0 conda-forge Cached
+ ca-certificates 2024.12.31 h06a4308_0 pkgs/main Cached
Summary:
Install: 12 packages
Upgrade: 1 packages
Total download: 0 B
──────────────────────────────────────────────────────────────────────────
Confirm changes: [Y/n] y
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(reflex-dash) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ cd .web/
(reflex-dash) [pedro.neto@ampt-prod-2-login-1 .web]$ npm i next
changed 1 package, and audited 540 packages in 8s
42 packages are looking for funding
run `npm fund` for details
1 moderate severity vulnerability
To address all issues, run:
npm audit fix --force
Run `npm audit` for details.
(reflex-dash) [pedro.neto@ampt-prod-2-login-1 .web]$ cd ..
(reflex-dash) [pedro.neto@ampt-prod-2-login-1 ampt-cfd-azure-dashboard]$ reflex run
─────────────────────── Starting Reflex App ───────────────────────
─────────────────────────── App Running ───────────────────────────
App running at: http://localhost:3000
Backend running at: http://0.0.0.0:8080