question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem at runtime svelte-check

See original GitHub issue

Describe the bug

Sometimes when running both scripts the following log is displayed.

"check": "svelte-check --tsconfig ./jsconfig.json"
"check:watch": "svelte-check --tsconfig ./jsconfig.json --watch"

Reproduction

Executing task: pnpm run check <

svelte@0.0.1 check /home/format/Desktop/pj/svelte svelte-check --tsconfig ./jsconfig.json

==================================== Loading svelte-check in workspace: /home/format/Desktop/pj/svelte Getting Svelte diagnostics…

Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ ‘lib/mappings.wasm’: … }) before using SourceMapConsumer at readWasm (/home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/read-wasm.js:8:13) at wasm (/home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/wasm.js:25:16) at /home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/source-map-consumer.js:264:14 at async SvelteDocumentSnapshot.getMapper (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:82021:58) at async SvelteDocumentSnapshot.getFragment (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:82003:56) at async DiagnosticsProviderImpl.getDiagnostics (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:83330:26) at async PluginHost.tryExecutePlugin (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97255:20) at async Promise.all (index 2) at async PluginHost.getDiagnostics (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97037:36) at async SvelteCheck.getDiagnosticsForFile (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97747:29) Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ ‘lib/mappings.wasm’: … }) before using SourceMapConsumer at readWasm (/home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/read-wasm.js:8:13) at wasm (/home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/wasm.js:25:16) at /home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/source-map-consumer.js:264:14 at async SvelteDocumentSnapshot.getMapper (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:82021:58) at async SvelteDocumentSnapshot.getFragment (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:82003:56) at async DiagnosticsProviderImpl.getDiagnostics (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:83330:26) at async PluginHost.tryExecutePlugin (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97255:20) at async Promise.all (index 2) at async PluginHost.getDiagnostics (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97037:36) at async SvelteCheck.getDiagnosticsForFile (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97747:29) Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ ‘lib/mappings.wasm’: … }) before using SourceMapConsumer at readWasm (/home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/read-wasm.js:8:13) at wasm (/home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/wasm.js:25:16) at /home/format/Desktop/pj/svelte/node_modules/.pnpm/source-map@0.7.3/node_modules/source-map/lib/source-map-consumer.js:264:14 at async SvelteDocumentSnapshot.getMapper (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:82021:58) at async SvelteDocumentSnapshot.getFragment (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:82003:56) at async DiagnosticsProviderImpl.getDiagnostics (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:83330:26) at async PluginHost.tryExecutePlugin (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97255:20) at async Promise.all (index 2) at async PluginHost.getDiagnostics (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97037:36) at async SvelteCheck.getDiagnosticsForFile (/home/format/Desktop/pj/svelte/node_modules/.pnpm/svelte-check@2.7.0_rcp265tljkmwtugt6bheyqlznm/node_modules/svelte-check/dist/src/index.js:97747:29)

svelte-check found 0 errors, 0 warnings, and 0 hints

Expected behaviour

The execution of svelte-check correctly.

System Info

Distributor ID: Kali Description: Kali GNU/Linux Rolling Release: 2022.1 Codename: kali-rolling

VSCode 1.66.2 dfd34e8260c270da74b5c2d86d61aee4b6d56977 x64

Which package is the issue about?

Svelte for VS Code

Additional Information, eg. Screenshots

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
DetachHeadcommented, Apr 22, 2022

yeah, i’ve just made a PR fixing it #1456

1reaction
jasonlyu123commented, Apr 22, 2022

Does the error persist if you install sourcep-map@0.8.0-beta.0?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docs • Svelte
Complete documentation for Svelte.
Read more >
svelte-check - npm
Check your code with svelte-check. Provides CLI diagnostics checks for: Unused CSS; Svelte A11y hints; JavaScript/TypeScript compiler errors.
Read more >
Svelte generates a LOT of JS output code. How is it not adding ...
Svelte docs mentions heavily that they are a compiler and don't have runtime cost but all the the compiled output which is svelte...
Read more >
Dynamic behavior in Svelte: working with variables and props
This is because we are currently not passing any value into it from App. svelte , so it's using the default value.
Read more >
Svelte Component Test Recipes - David Peng
SvelteKit runtime modules like $app/stores and $app/navigation are not set until SvelteKit's start function is called, which means you won't ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found