Skip to content

Unterminated string literal error in @vincjo/datatables #15017

@ritikdubeyEn

Description

@ritikdubeyEn

Describe the bug

When using @vincjo/datatables with a Svelte 5 project, several files in the package throw an "Unterminated string literal" error during build. These errors seem to occur in multiple .svelte files from the library. Opened a thread on vincjo issues, but seems to be issue is not there. vincjo/datatables#153 Also issue seems to be reported here in Mitcheljager/svelte-confetti#18

Reproduction

Create a new Svelte project:

npm create svelte@latest my-svelte-app
cd my-svelte-app
npm install

Install @vincjo/datatables:

npm install @vincjo/datatables
Import and use any component from the library in a .svelte file.
Run the project:

npm run dev

Logs

✘ [ERROR] Unterminated string literal

node_modules/@vincjo/datatables/dist/local/Search.svelte:13:8:
13 │ code: '
╵ ^
✘ [ERROR] Unterminated string literal

node_modules/@vincjo/datatables/dist/local/ThFilter.svelte:13:8:
13 │ code: '
╵ ^
...
Error: Build failed with 7 errors:
node_modules/@vincjo/datatables/dist/local/Datatable.svelte:20:8: ERROR: Unterminated string literal
node_modules/@vincjo/datatables/dist/local/Pagination.svelte:22:8: ERROR: Unterminated string literal

System Info

System:
  OS: macOS Ventura 13.3.1
Binaries:
  Node: 23.5.0
  npm: 11.0.0
npmPackages:
  	"svelte": "^5.0.0",
		"svelte-check": "^4.0.0",
		"tailwindcss": "^3.3.2",
		"tslib": "^2.4.1",
		"typescript": "^5.5.0",
		"vite": "^5.4.4",
		"vitest": "^1.0.0"
	},
	"type": "module",
	"dependencies": {
		"@floating-ui/core": "^1.6.7",
		"@floating-ui/dom": "^1.6.10",
		"@vincjo/datatables": "^1.14.10",

Severity

blocking all usage of svelte

Metadata

Metadata

Assignees

No one assigned

    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