Skip to content

Commit 8aed1a8

Browse files
authored
build(web-ui): fix rollup failing (#4687)
1 parent 5bd3a2b commit 8aed1a8

4 files changed

Lines changed: 38 additions & 9 deletions

File tree

.github/workflows/ci-windows.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ jobs:
7171
"mingw-w64-${TOOLCHAIN}-graphviz"
7272
"mingw-w64-${TOOLCHAIN}-miniupnpc"
7373
"mingw-w64-${TOOLCHAIN}-nlohmann-json"
74-
"mingw-w64-${TOOLCHAIN}-nodejs"
7574
"mingw-w64-${TOOLCHAIN}-onevpl"
7675
"mingw-w64-${TOOLCHAIN}-openssl"
7776
"mingw-w64-${TOOLCHAIN}-opus"
@@ -82,6 +81,7 @@ jobs:
8281
dependencies+=(
8382
"mingw-w64-${TOOLCHAIN}-MinHook"
8483
"mingw-w64-${TOOLCHAIN}-nsis"
84+
"mingw-w64-${TOOLCHAIN}-nodejs"
8585
)
8686
fi
8787
@@ -146,6 +146,28 @@ jobs:
146146
with:
147147
dotnet-version: '10.x'
148148

149+
- name: Setup NodeJS
150+
# Clang compiled NodeJS has issues when running rollup webpack
151+
if: matrix.msystem != 'ucrt64'
152+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
153+
with:
154+
node-version: 'lts/*'
155+
156+
- name: NodeJS Path
157+
if: matrix.msystem != 'ucrt64'
158+
shell: pwsh
159+
run: |
160+
# get NodeJS PATH
161+
$NODEJS_BINARY_PATH = (Get-Command node).Source
162+
$NODEJS_PATH = Split-Path -Path "$NODEJS_BINARY_PATH" -Parent
163+
164+
# setup environment variables
165+
echo "NODEJS_PATH=$NODEJS_PATH" >> $env:GITHUB_ENV
166+
167+
# step output
168+
echo "nodejs-path=$NODEJS_PATH"
169+
echo "nodejs-path=$NODEJS_PATH" >> $env:GITHUB_OUTPUT
170+
149171
- name: Setup python
150172
id: setup-python
151173
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -166,10 +188,19 @@ jobs:
166188
- name: Build Windows
167189
shell: msys2 {0}
168190
env:
191+
# MSYSTEM is a built-in environment variable of MSYS2.
192+
# Do not use this environment variable name.
193+
MATRIX_MSYSTEM: ${{ matrix.msystem }}
169194
BRANCH: ${{ github.head_ref || github.ref_name }}
170195
BUILD_VERSION: ${{ inputs.release_version }}
171196
COMMIT: ${{ inputs.release_commit }}
172197
run: |
198+
# setup NodeJS PATH
199+
if [[ "${MATRIX_MSYSTEM}" != "ucrt64" ]]; then
200+
NODEJS_PATH=$(cygpath "$NODEJS_PATH")
201+
export PATH="$PATH:$NODEJS_PATH"
202+
fi
203+
173204
mkdir -p build
174205
cmake \
175206
-B build \

docs/building.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ dependencies=(
161161
"mingw-w64-${TOOLCHAIN}-doxygen" # Optional, for docs... better to install official Doxygen
162162
"mingw-w64-${TOOLCHAIN}-graphviz" # Optional, for docs
163163
"mingw-w64-${TOOLCHAIN}-miniupnpc"
164-
"mingw-w64-${TOOLCHAIN}-nodejs"
165164
"mingw-w64-${TOOLCHAIN}-onevpl"
166165
"mingw-w64-${TOOLCHAIN}-openssl"
167166
"mingw-w64-${TOOLCHAIN}-opus"
@@ -170,6 +169,7 @@ dependencies=(
170169
if [[ "${MSYSTEM}" == "UCRT64" ]]; then
171170
dependencies+=(
172171
"mingw-w64-${TOOLCHAIN}-MinHook"
172+
"mingw-w64-${TOOLCHAIN}-nodejs"
173173
"mingw-w64-${TOOLCHAIN}-nsis"
174174
)
175175
fi
@@ -178,6 +178,8 @@ pacman -S "${dependencies[@]}"
178178

179179
To create a WiX installer, you also need to install [.NET](https://dotnet.microsoft.com/download).
180180

181+
For ARM64: To build frontend, you also need to install [Node.JS](https://nodejs.org/en/download)
182+
181183
### Clone
182184
Ensure [git](https://git-scm.com) is installed on your system, then clone the repository using the following command:
183185

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
"@vitejs/plugin-vue": "6.0.1",
2323
"serve": "14.2.5",
2424
"vite": "6.3.6",
25-
"vite-plugin-ejs": "1.7.0",
26-
"@rollup/wasm-node": "4.57.1"
27-
},
28-
"overrides": {
29-
"rollup": "npm:@rollup/wasm-node@4.57.1"
25+
"vite-plugin-ejs": "1.7.0"
3026
}
3127
}

scripts/linux_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ elif grep -q "Debian GNU/Linux 12 (bookworm)" /etc/os-release; then
695695
cuda_version="12.9.1"
696696
cuda_build="575.57.08"
697697
gcc_version="13"
698-
nvm_node=1
698+
nvm_node=0
699699
elif grep -q "Debian GNU/Linux 13 (trixie)" /etc/os-release; then
700700
distro="debian"
701701
version="13"
@@ -704,7 +704,7 @@ elif grep -q "Debian GNU/Linux 13 (trixie)" /etc/os-release; then
704704
cuda_version="12.9.1"
705705
cuda_build="575.57.08"
706706
gcc_version="14"
707-
nvm_node=1
707+
nvm_node=0
708708
elif grep -q "PLATFORM_ID=\"platform:f41\"" /etc/os-release; then
709709
distro="fedora"
710710
version="41"

0 commit comments

Comments
 (0)