AOSSIE-Org / AOSSIE-Org/Resonate-Website
Bug: npm run build / lint / test all fail on main — CI red since design-migration merge (leftover root app/ shadows src/app)
- Lingua principale
- TypeScript
- Stelle
- 43
- Fork
- 154
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### 🐛 Describe the bug
On the current `main` branch, all three quality gates required by CONTRIBUTING.md fail, and both CI workflows (`Next.js CI` and `Deploy Next.js site to Pages`) have been red on every push since the "migrate to new design" merge (#386, 2026-08-12).
### Reproduce (Node 20+, fresh clone of `main`)
```
npm ci
npm run build # exit 1
npm run lint # exit 1
npm run test # exit 1
```
### Observed
**`npm run build`** → `Turbopack build failed with 22 errors`, all traced to the legacy root `app/` tree:
```
./app/components/About/About.jsx:3 Module not found: Can't resolve '../../assets/aossie_logo.png'
./app/components/Features/Features.jsx Module not found: Can't resolve 'gsap', 'react-icons/fa', 'react-icons/si', ...
Import traces:
./app/components/About/About.jsx -> ./app/page.jsx [Server Component]
```
**`npm run lint`** → 1 error:
```
app/components/ui/theme-toggle.tsx:15 Avoid calling setState() directly within an effect react-hooks/set-state-in-effect
```
**`npm run test`** → 2 test files fail to load:
```
Can't resolve '@/components/layout/Navbar'
```
### Root cause
The migration merge (#386) left the **legacy root `app/` directory** in place and did **not** create `src/components/` on `main`:
1. `app/page.jsx` / `app/layout.js` are old-design files that import assets (`../../assets/*.png`) and packages (`gsap`, `react-icons`) which were removed during the migration and are no longer in `package.json`. Next.js 16 uses the root `app/` over `src/app/`, so the build never reaches the intended `src/app/[locale]/`.
2. Even with root `app/` removed, `src/components/` is missing (components landed under `app/components/` instead), so `@/components/*` (tsconfig `@ → src/*`) cannot resolve — this is what also breaks `npm run test`. Verified by temporarily moving `app/` aside: the build then fails on `./src/app/[locale]/page.tsx` → `Can't resolve '@/components/home/About'`.
### Expected
`npm run lint && npm run test && npm run build` all pass, matching the `dev` branch. which is already correct (no root `app/`; components in `src/components/`). `main` did not receive these two changes from the merge.
### Fix direction
Bring `main` in line with `dev`: delete the legacy root `app/` directory and ensure the new components live at `src/components/` so `@/components/*` resolves.
### Not a duplicate
Checked all 28 open issues, all 20 open PRs, and closed issues/PRs. No issue reports the build failure or the stale `app/` directory. The closest, #310 (`themeColor…in layout.js`) and #307 (`GSAP leak in page.jsx`), point at the *legacy* files as if they were live code — they are symptoms of this bug, not this bug. No open PR against `main` removes root `app/` or restores `src/components/`.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.