33800 Docs

← Retour

TÂCHE : Test QwikPress Mode Local

ID : qwikpress-local-test Date : 30/12/2024 Status : EN ATTENTE - REPREND CETTE SEMAINE Priorité : Haute


OBJECTIF

Valider que le projet QwikPress fonctionne en mode local (fichiers JSON) après la migration de 49 fichiers vers le nouveau système StorageService.


PRÉREQUIS


ÉTAPES

1. Préparation environnement

2. Données de test

3. Test mode local

4. Test mode Supabase


BLOCAGE ACTUEL

Erreur : Site configuration not found Fichier : src/services/storage/file-storage.service.ts:217

Le fichier config.json EXISTE à STORAGE/data/config.json

Debug à faire :

  1. Ajouter console.log dans FileStorageService :

    async getConfig(): Promise<SiteConfig> {
    const configPath = this.getPath('data', 'config.json');
    console.log('[DEBUG] Config path:', configPath);
    console.log('[DEBUG] File exists:', existsSync(configPath));
    // ...
    }
  2. Tester chemin absolu dans .env :

    STORAGE_PATH=/home/gouroubleu/WS/qwikpress-gitlab/STORAGE
  3. Vider cache Vite :

    rm -rf node_modules/.vite

FICHIERS CONCERNÉS

~/WS/qwikpress-gitlab/
├── .env                  # Config active
├── .env.local           # Template mode local
├── .env.supabase        # Template mode Supabase
├── STORAGE/
│   └── data/
│       ├── config.json          # Config site
│       └── pages/
│           ├── home/
│           │   ├── meta.json
│           │   └── content.json
│           ├── about/
│           ├── services/
│           ├── contact/
│           └── testimonials/
└── src/
    ├── routes/
    │   └── plugin@data.ts       # Initialise StorageService
    └── services/
        └── storage/
            └── file-storage.service.ts  # Service à débugger

RÉSULTAT ATTENDU


NOTES