Skip to content

Commit 6552b5e

Browse files
Th0rgalclaude
andauthored
fix(flathub): add npm cache configuration for offline builds (#39)
The Flatpak build was failing because npm couldn't find cached packages during offline builds. This adds the required npm cache environment variables to the manifest: - XDG_CACHE_HOME: points to flatpak-node cache directory - npm_config_cache: points to npm-cache from flatpak-node-generator - npm_config_offline: ensures npm uses cached packages only This fixes the ENOTCACHED error for packages like zustand during the Flathub CI build. Fixes flathub/flathub#7454 Co-authored-by: Thomas Marchand (agent) <agent@thomas.md> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 285d6fc commit 6552b5e

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

.github/workflows/store-publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,10 @@ jobs:
465465
append-path: /usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/node20/bin
466466
env:
467467
CARGO_HOME: /run/build/shard-launcher/cargo
468+
XDG_CACHE_HOME: /run/build/shard-launcher/flatpak-node/cache
469+
npm_config_cache: /run/build/shard-launcher/flatpak-node/npm-cache
468470
npm_config_nodedir: /usr/lib/sdk/node20
471+
npm_config_offline: 'true'
469472
470473
modules:
471474
# Install OpenJDK 21 for running Minecraft

desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "shard-ui",
33
"private": true,
4-
"version": "0.1.16",
4+
"version": "0.1.17",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

desktop/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "shard_ui"
3-
version = "0.1.16"
3+
version = "0.1.17"
44
description = "Shard launcher UI"
55
authors = ["you"]
66
edition = "2021"

desktop/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2.0.2",
33
"productName": "Shard Launcher",
4-
"version": "0.1.16",
4+
"version": "0.1.17",
55
"identifier": "sh.shard.launcher",
66
"build": {
77
"beforeDevCommand": "bun run dev",

launcher/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "shard"
3-
version = "0.1.16"
3+
version = "0.1.17"
44
edition = "2024"
55
description = "A minimal, content-addressed Minecraft launcher"
66
license = "MIT"

0 commit comments

Comments
 (0)