app-template-svelte-typescript fails to compile App.svelte if unrelated test import is removed #2472
-
Hello! I've come across a problem where the application code no longer compiles when a test library import is removed from a seemingly unrelated file. Steps to reproduce# Create project with the template
npx create-snowpack-app theapp --template @snowpack/app-template-svelte-typescript
# Enter the project
cd theapp
# Verify that the project works
npm start # This succeeds
# Remove the test file
rm src/App.test.ts
# Now the project fails to build citing an unrelated file not being found
npm start In this example I've removed the entire file, but it is enough to remove or comment out just this line: The error
How might I remove this test file while without breaking compilation of the app? VersionsUbuntu 20.04 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Hi @lpil thanks for reporting. Going to pass this one on to the other maintainers to take a look at since I don't specialize in TS. |
Beta Was this translation helpful? Give feedback.
-
👋 heya @lpil, Not sure if you ever got to the bottom of this but I managed to get this working following the advice in this SO thread: |
Beta Was this translation helpful? Give feedback.
-
I opened #2863. |
Beta Was this translation helpful? Give feedback.
-
For anyone else having this issue, I solved this issue by adding "svelte" to your "types" in your "tsconfig.json". Example: |
Beta Was this translation helpful? Give feedback.
👋 heya @lpil,
Not sure if you ever got to the bottom of this but I managed to get this working following the advice in this SO thread:
https://stackoverflow.com/questions/64194571/cannot-find-module-app-svelte-or-its-corresponding-type-declarations