-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.html
More file actions
65 lines (55 loc) · 2.63 KB
/
debug.html
File metadata and controls
65 lines (55 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Debug - Busy BOB</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100 p-8">
<div id="debug-output" class="max-w-2xl mx-auto bg-white p-6 rounded-lg shadow">
<h1 class="text-2xl font-bold mb-4">Debug Information</h1>
<div id="status"></div>
</div>
<script type="module">
const statusDiv = document.getElementById('status');
function log(message, type = 'info') {
const div = document.createElement('div');
div.className = `p-2 mb-2 rounded ${type === 'error' ? 'bg-red-100 text-red-800' : 'bg-blue-100 text-blue-800'}`;
div.textContent = message;
statusDiv.appendChild(div);
}
try {
log('Starting debug...');
// Test environment variables
log(`VITE_SUPABASE_URL: ${import.meta.env.VITE_SUPABASE_URL ? 'Set' : 'Missing'}`);
log(`VITE_SUPABASE_ANON_KEY: ${import.meta.env.VITE_SUPABASE_ANON_KEY ? 'Set' : 'Missing'}`);
// Test imports one by one
log('Testing imports...');
import('./src/lib/supabase.js').then(() => {
log('✅ Supabase import successful');
import('./src/components/AuthPages.js').then(() => {
log('✅ AuthPages import successful');
import('./src/components/LandingPage.js').then(() => {
log('✅ LandingPage import successful');
import('./src/utils/helpers.js').then(() => {
log('✅ Helpers import successful');
log('🎉 All imports working! The issue might be in main.js initialization.');
}).catch(err => {
log(`❌ Helpers import failed: ${err.message}`, 'error');
});
}).catch(err => {
log(`❌ LandingPage import failed: ${err.message}`, 'error');
});
}).catch(err => {
log(`❌ AuthPages import failed: ${err.message}`, 'error');
});
}).catch(err => {
log(`❌ Supabase import failed: ${err.message}`, 'error');
});
} catch (error) {
log(`❌ Debug error: ${error.message}`, 'error');
}
</script>
</body>
</html>