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

Framework support for SvelteKit #20

Closed
jthegedus opened this issue May 21, 2021 · 13 comments
Closed

Framework support for SvelteKit #20

jthegedus opened this issue May 21, 2021 · 13 comments
Labels
enhancement New feature or request tracked

Comments

@jthegedus
Copy link

jthegedus commented May 21, 2021

Describe the solution you'd like

https://stackblitz.com/edit/sveltekit-template

This is a clone of the current SvelteKit template app

Turbo failed to install @sveltejs/kit@next however using npm "worked" 🤷

The webcontainer fails to start, I believe it is something to do with the package resolution. SvelteKit is built with pnpm if that matters.

Before I new to use Turbo I had installed the deps with npm and was unable to run npm run dev as there was an issue resolving the deps. I will try and recreate and pase the error here.

Give a link to a github repo containing an example of the framework

I am the creator of adapter to configure SvelteKit apps for SSR hosting on Firebase - svelte-adapter-firebase

Here is the same template as above that I use for CI testing of the adapter - https://github.com/jthegedus/svelte-adapter-firebase/tree/main/examples/functions_single_site

I am keen to have a complete solution for Firebase web app development.

Additional context

#8 is almost certainly related because:

  • SvelteKit is built on top of Vite.
  • SvelteKit adapters use esbuild duing the build step.
@KwintenP KwintenP added the bug Something isn't working label May 21, 2021
@KwintenP
Copy link
Contributor

A bug for sure. Like you said, very likely related to #8 which has been on our roadmap for sure.

@EricSimons
Copy link
Member

SvelteKit also uses ESM for their package, no CJS, so that will need to be enabled as well. We might need to open a separate ticket for ESM support specifically

@jthegedus
Copy link
Author

I thought ESM was a requirement for Vite and thus captured in #8

@EricSimons
Copy link
Member

EricSimons commented May 22, 2021

@jthegedus ah I didn't realize Vite was relying on ESM too- good catch. 🙏

@KwintenP maybe we create a root issue for enable node.js es modules support that both this issue and #8 reference as prerequisites?

@guidobouman
Copy link

guidobouman commented May 24, 2021

Probably redundant, but just in case: Initialising a project with npm init does not seem to work. There's some sort of hook that does not expect the extra arguments, and tries to run turbo.

❯ npm init svelte@next test
Unknown Syntax Error: Extraneous positional argument ("svelte@next").

$ turbo create [-p,--private] [-w,--workspace] [--cwd,--prefix #0] [-s,--silent] [--quiet] [-V,--verbose] [--loglevel #0]

error Command failed with exit code 1

Once a SvelteKit example is setup, this is of course not needed anymore.

@jthegedus
Copy link
Author

Yes, npm init does not work and I had to manually setup each of the resources in the linked example. Ideally turbo would support these commands.

@KwintenP
Copy link
Contributor

@guidobouman npm init has an open issue in #2
@EricSimons we are using #6 to track esm module support

@KwintenP KwintenP added enhancement New feature or request tracked and removed bug Something isn't working labels May 25, 2021
@milky2028
Copy link

I'm getting errors here as well, but instead getting:

Command failed: git ls-remote https://github.com/Axelen123/svelte-component-template
jsh: command not found: git

Great choice! Generating your Svelte app... !
 ›   Error: Something went wrong, try again! Error: could not find commit hash for 
 ›   master

@guidobouman
Copy link

@milky2028 see #2 (comment) for more info. npm init was fixed, now they're on a level lower: git.

@SamVerschueren
Copy link
Contributor

ESM is now supported but we found a bug when testing SvelteKit. There’s an open internal PR to resolve that so stay tuned!

@franxois
Copy link

When I saw the tweet about vite.js, I try sveltekit from an existing repository but it doesn't work https://stackblitz.com/github/franxois/svelte-kit-demo-app

@EricSimons
Copy link
Member

EricSimons commented Aug 17, 2021

@franxois we're still WIP on getting a few fixes in that will enable SvelteKit, the team will circle back here once these updates hit production.

@d3lm
Copy link

d3lm commented Aug 31, 2021

Hey ya'all 👋

We have pushed several fixes that now unlock SvelteKit on StackBlitz. Here's an example. However, npm init still doesn't work because we are still working on our git internals and CLI.

@d3lm d3lm closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tracked
Projects
None yet
Development

No branches or pull requests

8 participants