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

No longer works with Typescript 5.0 #586

Closed
CrendKing opened this issue Mar 16, 2023 · 0 comments
Closed

No longer works with Typescript 5.0 #586

CrendKing opened this issue Mar 16, 2023 · 0 comments

Comments

@CrendKing
Copy link

CrendKing commented Mar 16, 2023

Describe the bug
I updated dependency of Typescript from 4.9.5 to 5.0.2 and pnpm tauri build starts to fail in svelte-preprocess.

Logs
N/A

To Reproduce
To help us help you, if you've found a bug please consider the following:

  • Create sample app with pnpm create tauri-app. Choosing options for Typescript and Svelte.
  • Change dependency of typescript to 5.* in package.json. Leave everything untouched.
  • pnpm tauri build

Expected behavior
The app is built successfully.

Stacktraces

Stack trace
> tauri-app@0.0.0 tauri D:\tauri-app
> tauri "build"

     Running beforeBuildCommand `pnpm build`

> tauri-app@0.0.0 build D:\tauri-app
> vite build

vite v4.2.0 building for production...
transforming (1) index.htmlerror TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
  Use 'verbatimModuleSyntax' instead.
error TS5101: Option 'preserveValueImports' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
  Use 'verbatimModuleSyntax' instead.

✓ 3 modules transformed.
[vite-plugin-svelte] dom compile done.
package files   time    avg
✓ built in 298ms
[vite-plugin-svelte] Error while preprocessing D:/tauri-app/src/App.svelte - [svelte-preprocess] Encountered type error
file: D:/tauri-app/src/App.svelte
error during build:
Error: Error while preprocessing D:/tauri-app/src/App.svelte - [svelte-preprocess] Encountered type error
    at throwError (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\modules\errors.js:5:11)
    at throwTypescriptError (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\modules\errors.js:9:28)
    at transpileTs (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\transformers\typescript.js:177:47)
    at simpleTranspiler (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\transformers\typescript.js:268:60)
    at transformer (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\transformers\typescript.js:311:11)
    at transform (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\autoProcess.js:47:12)
    at async D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\autoProcess.js:118:29
    at async script (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\autoProcess.js:148:33)
    at async process_single_tag (file:///D:/tauri-app/node_modules/.pnpm/svelte@3.57.0/node_modules/svelte/compiler.mjs:47843:27)
    at async Promise.all (index 0)
 ELIFECYCLE  Command failed with exit code 1.
       Error beforeBuildCommand `pnpm build` failed with exit code 1
 ELIFECYCLE  Command failed with exit code 1.

Information about your project:

  • Your operating system: Windows 11

  • svelte-preprocess version: 5.0.2

  • Whether your project uses Webpack or Rollup: No

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

1 participant