I tried to install remote-term on an old Raspberry Pi 2 and encountered issues for building the frontend.
The building process fail
The frontend build
❯ npm run build > remoteterm-meshcore-frontend@3.17.1 build > tsc && vite build <--- Last few GCs ---> [27995:0x20e5248] 240790 ms: Mark-Compact 234.7 (247.3) -> 232.5 (246.8) MB, 2006.16 / 0.00 ms (average mu = 0.166, current mu = 0.131) allocation failure; scavenge might not succeed [27995:0x20e5248] 243207 ms: Mark-Compact 234.5 (246.8) -> 232.6 (247.0) MB, 1816.88 / 0.00 ms (average mu = 0.205, current mu = 0.248) allocation failure; scavenge might not succeed <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace ----- Aborted
I searched a little and found that the following settings are required to finish the build :
diff --git a/frontend/package.json b/frontend/package.json index 434b1aa..66468a9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -5,7 +5,8 @@ "type": "module", "scripts": { "dev": "vite", - "build": "tsc && vite build", + "build": "vite build", + "typecheck": "tsc", "packaged-build": "vite build --outDir prebuilt", "preview": "vite preview", "test": "vitest", diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index a11177e..6eba819 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -12,7 +12,10 @@ export default defineConfig({ }, build: { outDir: 'dist', - sourcemap: true, + sourcemap: false, + rollupOptions: { + maxParallelFileOps: 2 + } }, server: { host: true,
No dependencies set.
The note is not visible to the blocked user.
📝 Problem Description
I tried to install remote-term on an old Raspberry Pi 2 and encountered issues for building the frontend.
🚦 Current Behavior
The building process fail
🎯 Expected Behavior
The frontend build
📋 Steps to Reproduce
💻 Environment Information
📸 Screenshots / Debug Logs
🔁 Workaround
I searched a little and found that the following settings are required to finish the build :