Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unterminated string literal error in @vincjo/datatables #15017

Closed
ritikdubeyEn opened this issue Jan 15, 2025 · 5 comments
Closed

Unterminated string literal error in @vincjo/datatables #15017

ritikdubeyEn opened this issue Jan 15, 2025 · 5 comments

Comments

@ritikdubeyEn
Copy link

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

@Prinzhorn
Copy link
Contributor

Can you confirm that the issue persists with 5.18.0? There has been a similar issue that was just fixed (esrap not properly serializing strings)

@paoloricciuti
Copy link
Member

Can you confirm that the issue persists with 5.18.0? There has been a similar issue that was just fixed (esrap not properly serializing strings)

Yeah i think this was the issue.

@Prinzhorn
Copy link
Contributor

@paoloricciuti you can close this, it was confirmed that 5.18.0 fixed it Mitcheljager/svelte-confetti#18 (comment)

@paoloricciuti
Copy link
Member

Thanks!

@ritikdubeyEn
Copy link
Author

Yes Svelte 5.18.0 fixes this. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants