Skip to content

Current template does not work with @sveltejs/kit 1.0.0-next.477+ #6690

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

Closed
fvsch opened this issue Sep 9, 2022 · 3 comments · Fixed by #6697
Closed

Current template does not work with @sveltejs/kit 1.0.0-next.477+ #6690

fvsch opened this issue Sep 9, 2022 · 3 comments · Fixed by #6697
Labels
bug Something isn't working p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc. pkg:create-svelte

Comments

@fvsch
Copy link

fvsch commented Sep 9, 2022

Describe the bug

The project template at https://github.com./sveltejs/kit-template-default/

When breaking changes are shipped in SvelteKit that impact this template, it must be updated immediately or every user that creates a new project from this template will have a broken project on their hand. This is especially the case for StackBlitz, which uses https://sveltekit.new/ which redirects to https://stackblitz.com/fork/github/sveltejs/kit-template-default. For instance here's a bug report about this starter being broken: stackblitz/webcontainer-core#803

I tested locally and with the latest version of the template, here are the results with different SvelteKit versions:

@sveltejs/kit version Result of npm run dev
1.0.0-next.470 500 Cannot read properties of undefined (reading 'get')
1.0.0-next.471 500 Cannot read properties of undefined (reading 'get')
1.0.0-next.472 ok
1.0.0-next.474 ok
1.0.0-next.475 ok
1.0.0-next.476 ok
1.0.0-next.477 Error: Rename your server hook file from src/hooks.js to src/hooks.server.js
1.0.0-next.478 Error: Rename your server hook file from src/hooks.js to src/hooks.server.js
1.0.0-next.479 Error: Rename your server hook file from src/hooks.js to src/hooks.server.js

Reproduction

Reproductions will only work for the current @sveltejs/kit@next and current HEAD commit of the sveltejs/kit-template-default repo, of course.

Online:

  1. Visit https://stackblitz.com/fork/github/sveltejs/kit-template-default (Chrome-based browser or Firefox)
  2. Wait for dependency installation to finish and npm run dev to start.
  3. The preview frame should show an error.

Locally:

  1. Setup:
git clone [email protected]:sveltejs/kit-template-default.git
cd kit-template-default
npm install
npm run dev
  1. Open the development server page in a browser.

Logs

No response

System Info

System:
    OS: macOS 12.5.1
    CPU: (8) arm64 Apple M1
    Memory: 117.86 MB / 8.00 GB
    Shell: 3.5.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 16.17.0 - /opt/homebrew/opt/node@16/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.19.1 - /Volumes/Pieces/.npm/bin/npm
  Browsers:
    Chrome: 105.0.5195.102
    Firefox Nightly: 106.0a1
    Safari: 15.6.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.72
    @sveltejs/kit: 1.0.0-next.479 => 1.0.0-next.479
    svelte: ^3.46.0 => 3.50.1
    vite: ^3.1.0 => 3.1.0

Severity

blocking all usage of SvelteKit

Additional Information

No response

@fvsch
Copy link
Author

fvsch commented Sep 9, 2022

Would it be possible to have the template pin the version of @sveltejs/kit it was last updated for, until @svelte/kit reaches 1.0.0? That would be much safer for usage in StackBlitz.

@Conduitry
Copy link
Member

The problem is that #6586 didn't include a changeset (#6664), and then when #6675 added one later, it didn't include one for create-svelte, so the updated template was never released.

@Conduitry Conduitry added bug Something isn't working pkg:create-svelte p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc. labels Sep 9, 2022
@fvsch
Copy link
Author

fvsch commented Sep 9, 2022

Thanks a bunch @Conduitry! 🎉 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc. pkg:create-svelte
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants