[General] I think the working tree is messing up the app.
- 主要言語
- 言語のデータがありません
- スター
- 2.1k
- フォーク
- 153
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**Mood:** 😢
**Category:** Bugs
I think the working tree is messing up the app.
The presence of the extra folder is making the .enve variable inaccessible:
/Users/engineersticity/copilot-worktrees/my-app/engineersticity-miniature-winner
~/c/s/engineersticity-miniature-winner engineersticity/fix-hydration !1
How do we fix that. This is a monorepo. Rem??
I’m checking where env files are expected in this monorepo and whether this worktree actually has the local .env files present.
I’ve confirmed the local env files are gitignored here, so I’m checking how the web app reads them before I tell you the safest fix.
It’s not the extra folder depth. The issue is that a Git worktree is a separate checkout, and your local env files are gitignored, so they do not come along automatically.
I confirmed:
.gitignore ignores **/.env.local
the web apps read env from process.env in app-local code (apps/web-shop/src/lib/firebase/client.ts, apps/web-admin/src/lib/firebase/client.ts)
there is no .env.local present in this worktree
So in this worktree, Next sees no Firebase env and falls back to “not configured”.
Fix now
Put the env files inside this worktree:
Bash
cp /path/to/your/real/web-shop.env.local apps/web-shop/.env.local
cp /path/to/your/real/web-admin.env.local apps/web-admin/.env.local
or, if you already have them in the main checkout:
Bash
cp /Users/engineersticity/my-app/apps/web-shop/.env.local apps/web-shop/.env.local
cp /Users/engineersticity/my-app/apps/web-admin/.env.local apps/web-admin/.env.local
Restart the dev servers.
Better monorepo/worktree-safe setup
Best: keep secrets outside the repo and symlink them into each worktree:
Bash
ln -s ~/secrets/spar/web-shop.env.local apps/web-shop/.env.local
ln -s ~/secrets/spar/web-admin.env.local apps/web-admin/.env.local
Also good: use direnv or shell exports from repo root before starting Next.
Don’t rely on a repo-root .env.local for these apps; this repo is set up to use app-local env files.
Important: worktrees share Git history, not your ignored local files. So every new worktree needs its own .env.local files, copies, or symlinks.
---
| Field | Value |
| --- | --- |
| App version | 0.2.8 |
| OS | macOS 26.5.0 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Day 2 (Week 1) |
コントリビューションガイド
調査の方向性
.gitignore と apps/web-shop/src/lib/firebase/client.ts および apps/web-admin/src/lib/firebase/client.ts にある Firebase のエントリポイントを読むことから始めます。各アプリが想定しているローカル環境ファイルを確認し、影響を受ける開発サーバーを実行します。worktree に想定される設定があり、アプリが Firebase を未設定として報告しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- firebase, git, nextjs
- 領域
- developer-experience, devops, tooling
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100