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

[BUG] app-template-svelte-typescript fails to compile App.svelte if unrelated test import is removed #2863

Closed
4 tasks done
frederikhors opened this issue Mar 15, 2021 · 3 comments · Fixed by #3233
Closed
4 tasks done

Comments

@frederikhors
Copy link

Bug Report Quick Checklist

  • I am on the latest version of Snowpack & all plugins.
  • I use package manager npm
  • I run Snowpack on OS Windows 10
  • I run Snowpack on Node.js v14

Describe the bug

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.

To Reproduce

From #2472:

# 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:
https://github.com/snowpackjs/snowpack/blob/0f9d34b8cf747e33524b31920d5610f6403c5480/create-snowpack-app/app-template-svelte/src/App.test.js#L1

Expected behavior

It should work.

Anything else?

@thisislawatts found a solution: #2472 (comment)

@lpil suggested:

it looks like we may need to add the npm i --save-dev @tsconfig/svelte dep and add "extends": "@tsconfig/svelte/tsconfig.json", to .tsconfig.json for that template.

@frederikhors
Copy link
Author

frederikhors commented Mar 15, 2021

After adding @tsconfig/svelte now I have another error in my index.ts file:

Property 'hot' does not exist on type 'ImportMeta'.ts(2339).

😭

UPDATE: I can fix it using #1433 (comment).

@melissamcewen melissamcewen added this to Needs Triage in Triage Mar 15, 2021
@melissamcewen melissamcewen moved this from Needs Triage to Triaging in Triage Mar 15, 2021
drwpow added a commit that referenced this issue Apr 29, 2021
drwpow added a commit that referenced this issue Apr 29, 2021
drwpow added a commit that referenced this issue Apr 29, 2021
Triage automation moved this from Triaging to Closed Apr 30, 2021
@drwpow
Copy link
Collaborator

drwpow commented Apr 30, 2021

This has been fixed in the latest patch of @snowpack/app-template-svelte-typescript! Thanks for opening

@lpil
Copy link

lpil commented Apr 30, 2021

Thank you!

@FredKSchott FredKSchott removed this from Closed in Triage Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants