Skip to content

Copy and pasted content in and pressed enter and got an error #765

Closed

Description

@jackberger03

Copied content:
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
10:49:34 AM [vite] (ssr) Error when evaluating SSR module /src/routes/(auth)/admin/customers/[id]/+page.svelte: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3 </div> attempted to close an element that was not open
https://svelte.dev/e/element_invalid_closing_tag
Plugin: vite-plugin-svelte
File: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3
401 |
402 |
403 |
^
404 |
405 | {:else}
[Error [CompileError]: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3 </div> attempted to close an element that was not open
https://svelte.dev/e/element_invalid_closing_tag] {
id: 'src/routes/(auth)/admin/customers/[id]/+page.svelte',
frame: ' 401 | \n' +
' 402 | \n' +
' 403 | \n' +
' ^\n' +
' 404 | \n' +
' 405 | {:else}',
code: 'element_invalid_closing_tag',
loc: {
line: 403,
column: 3,
file: 'src/routes/(auth)/admin/customers/[id]/+page.svelte'
},
plugin: 'vite-plugin-svelte',
pluginCode: '<script lang="ts">\n' +
"\timport { onMount } from 'svelte';\n" +
"\timport { page } from '$app/stores';\n" +
"\timport { goto } from '$app/navigation';\n" +
"\timport { ApiService, type Customer, type Job } from '$lib/api.js';\n" +
"\timport { formatDate, formatDateTime } from '$lib/dateUtils.js';\n" +
"\timport UserManagement from '$lib/components/UserManagement.svelte';\n" +
"\timport TailwindButton from '$lib/components/TailwindButton.svelte';\n" +
"\timport TailwindCard from '$lib/components/TailwindCard.svelte';\n" +
"\timport TailwindBadge from '$lib/components/TailwindBadge.svelte';\n" +
"\timport { Plus, Calendar, User, Wrench, Trash2, Edit, AlertCircle, CreditCard, ExternalLink, Settings, ChevronRight } from 'lucide-svelte';\n" +
"\timport SubscriptionBadge from '$lib/components/SubscriptionBadge.svelte';\n" +
'\n' +
'\tlet customer: Customer | null = null;\n' +
'\tlet jobs: Job[] = [];\n' +
'\tlet loading = true;\n' +
'\tlet jobsLoading = true;\n' +
'\tlet deleting = false;\n' +
"\tlet error = '';\n" +
"\tlet jobError = '';\n" +
'\n' +
'\t$: customerId = $page.params.id;\n' +
'\n' +
'\tonMount(async () => {\n' +
'\t\tawait Promise.all([loadCustomer(), loadJobs()]);\n' +
'\t});\n' +
'\n' +
'\tasync function loadCustomer() {\n' +
'\t\ttry {\n' +
'\t\t\tcustomer = await ApiService.getCustomer(customerId);\n' +
'\t\t} catch (err) {\n' +
"\t\t\terror = err instanceof Error ? err.message : 'Failed to load customer';\n" +
'\t\t} finally {\n' +
'\t\t\tloading = false;\n' +
'\t\t}\n' +
'\t}\n' +
'\n' +
'\tasync function loadJobs() {\n' +
'\t\ttry {\n' +
'\t\t\tjobs = await ApiService.getCustomerJobs(customerId);\n' +
'\t\t\t\n' +
'\t\t\t// DEBUG: Log raw API response\n' +
"\t\t\tconsole.log('=== ADMIN CUSTOMER DETAIL VIEW DEBUG ===');\n" +
"\t\t\tconsole.log('Customer ID:', customerId);\n" +
"\t\t\tconsole.log('Total jobs loaded:', jobs.length);\n" +
"\t\t\tconsole.log('Raw jobs data from API:', JSON.parse(JSON.stringify(jobs)));\n" +
"\t\t\tconsole.log('Job statuses:', jobs.map(j => ({ id: j.id, title: j.title, status: j.status })));\n" +
"\t\t\tconsole.log('=====================================');\n" +
'\t\t} catch (err) {\n' +
"\t\t\tjobError = err instanceof Error ? err.message : 'Failed to load jobs';\n" +
'\t\t} finally {\n' +
'\t\t\tjobsLoading = false;\n' +
'\t\t}\n' +
'\t}\n' +
'\n' +
'\tasync function deleteJob(jobId: string) {\n' +
"\t\tif (!confirm('Are you sure you want to delete this job?')) return;\n" +
'\t\t\n' +
'\t\ttry {\n' +
'\t\t\tawait ApiService.deleteJob(jobId);\n' +
'\t\t\tawait loadJobs(); // Reload jobs\n' +
'\t\t} catch (err) {\n' +
"\t\t\tjobError = err instanceof Error ? err.message : 'Failed to delete job';\n" +
'\t\t}\n' +
'\t}\n' +
'\n' +
"\tfunction getStatusVariant(status: string): 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' {\n" +
'\t\tswitch (status) {\n' +
"\t\t\tcase 'open': return 'primary';\n" +
"\t\t\tcase 'assigned': return 'warning';\n" +
"\t\t\tcase 'in-progress': return 'secondary';\n" +
"\t\t\tcase 'closed': return 'success';\n" +
"\t\t\tcase 'needs_manual_assignment': return 'danger';\n" +
"\t\t\tdefault: return 'default';\n" +
'\t\t}\n' +
'\t}\n' +
'\n' +
'\tfunction formatStatus(status: string): string {\n' +
"\t\treturn status.charAt(0).toUpperCase() + status.slice(1).replace('
', ' ').replace('-', ' ');\n" +
'\t}\n' +
'\n' +
'\n' +
'\tasync function handleDelete() {\n' +
'\t\tif (!confirm(Are you sure you want to delete "${customer?.info.legalName}"? This action cannot be undone.)) {\n' +
'\t\t\treturn;\n' +
'\t\t}\n' +
'\n' +
'\t\tdeleting = true;\n' +
"\t\terror = '';\n" +
'\n' +
'\t\ttry {\n' +
'\t\t\tawait ApiService.deleteCustomer(customerId);\n' +
"\t\t\tgoto('/admin/customers');\n" +
'\t\t} catch (err) {\n' +
"\t\t\terror = err instanceof Error ? err.message : 'Failed to delete customer';\n" +
'\t\t\tdeleting = false;\n' +
'\t\t}\n' +
'\t}\n' +
'</script>\n' +
'\n' +
'svelte:head\n' +
"\t<title>{customer ? customer.info.legalName : 'Customer'} - Resilient Schedule</title>\n" +
'</svelte:head>\n' +
'\n' +
'

\n' +
'\t\n' +
'\t\n' +
'\t\tCustomers\n' +
'\t\t›\n' +
\t\t<span class="text-[#1B2438]">{customer ? customer.info.legalName : 'Loading...'}</span>\n +
'\t\n' +
'\n' +
'\t{#if loading}\n' +
'\t\t
\n' +
'\t\t\t
\n' +
'\t\t\t\t
\n' +
'\t\t\t
\n' +
'\t\t\t

Loading customer details...

\n' +
'\t\t
\n' +
'\t{:else if error}\n' +
'\t\t
\n' +
'\t\t\t

Error: {error}

\n' +
'\t\t
\n' +
'\t{:else if customer}\n' +
'\t\t
\n' +
'\t\t\t\n' +
'\t\t\t
\n' +
'\t\t\t\t
\n' +
'\t\t\t\t\t

{customer.info.legalName}

\n' +
'\t\t\t\t\t

Customer ID: {customer._id}

\n' +
'\t\t\t\t
\n' +
'\t\t\t\t
\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\t\n' +
'\t\t\t\t\t\tEdit Customer\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t<TailwindButton \n' +
'\t\t\t\t\t\tvariant="danger"\n' +
'\t\t\t\t\t\ton:click={handleDelete}\n' +
'\t\t\t\t\t\tdisabled={deleting}\n' +
'\t\t\t\t\t>\n' +
'\t\t\t\t\t\t\n' +
"\t\t\t\t\t\t{deleting ? 'Deleting...' : 'Delete Customer'}\n" +
'\t\t\t\t\t\n' +
'\t\t\t\t
\n' +
'\t\t\t
\n' +
'\n' +
'\t\t\t
\n' +
'\t\t\t\t\n' +
'\t\t\t\t
\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t

Subscription Information

\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

Current Plan

\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
"\t\t\t\t\t\t\t\t\t{#if customer.subscriptionTier && customer.subscriptionTier !== 'none'}\n" +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\tCustomer has an active subscription plan\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t{:else}\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\tNo active subscription\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t{/if}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

Stripe Information

\n' +
'\t\t\t\t\t\t\t\t\t{#if customer.info.payment?.stripeCustomerId}\n' +
'\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\tCustomer ID:\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t{customer.info.payment.stripeCustomerId}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t{#if customer.info.payment?.stripeSubscriptionId}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\tSubscription ID:\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t{customer.info.payment.stripeSubscriptionId}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t{/if}\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t<TailwindButton \n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\tvariant="outline" \n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\tsize="sm"\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\thref="https://dashboard.stripe.com/customers/{customer.info.payment.stripeCustomerId}"\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\ttarget="_blank"\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\trel="noopener noreferrer"\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t>\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\tView in Stripe\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t{:else}\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\tNo Stripe customer ID associated\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t{/if}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t
\n' +
'\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

Jobs ({jobs.length})

\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\tNew Job\n' +
'\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t{#if jobError}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t{jobError}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t{/if}\n' +
'\n' +
'\t\t\t\t\t\t\t{#if jobsLoading}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

Loading jobs...

\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t{:else if jobs.length === 0}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

No jobs found for this customer

\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\tCreate First Job\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t{:else}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t{#each jobs as job}\n' +
'\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{job.title}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t{#if job.status}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TailwindBadge variant={getStatusVariant(job.status)} cla'... 6435 more characters,
runnerError: Error: RunnerError
at reviveInvokeError (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:552:18)
at Object.invoke (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:635:15)
at async SSRCompatModuleRunner.getModuleInformation (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1205:73)
at async SSRCompatModuleRunner.import (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1116:27)
at async instantiateModule (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:25231:12)
at async loud_ssr_load_module (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:70:11)
at async resolve (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:97:18)
at async result.component (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:206:41)
at async Promise.all (index 3)
at async render_response (eval at runInlinedModule (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1062:11), :77:21)
}

Google Chrome is requesting /.well-known/appspecific/com.chrome.devtools.json to automatically configure devtools project settings. To serve this file, add this plugin to your Vite config:

https://github.com/ChromeDevTools/vite-plugin-devtools-json
Error:

failed to send message: POST
"http://127.0.0.1:64306/session/ses_ 815b1ebc7ffezLaR2MhvH7RipW/message":
400 Bad Request
{"name": "UnknownError", "data": {"mess age": "Error: Session
ses_815b1ebc7ffezLaR2MhvH7RipWis
busy "}}

Activity

  1. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions