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

Errors with SvelteKit 1.0.0-next.191 or newer #196

Closed
skrenes opened this issue Oct 30, 2021 · 4 comments
Closed

Errors with SvelteKit 1.0.0-next.191 or newer #196

skrenes opened this issue Oct 30, 2021 · 4 comments

Comments

@skrenes
Copy link

skrenes commented Oct 30, 2021

I hope this isn't an anomaly with my configuration, but since upgrading to Sveltekit 1.0.0-next.191 or newer, I'm getting a bunch of promise errors that prevent subscriptions from working. Queries still work though, despite the errors. I'm using a similar setup to my houdini-kit example.

GET /$houdini/index.js net::ERR_ABORTED 403
subscription:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: /src/routes/subscription.svelte
start.js:1190 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: /src/routes/__layout.svelte
async function (async)
start @ start.js:1183
(anonymous) @ subscription:16
subscription.svelte:29 GET /$houdini/artifacts/SubUsers.js net::ERR_ABORTED 403

My guess it may have to do with their security upgrade to Vite 2.6.12, specify allow list, and print warning and the location of the $houdini folder.

@AlecAivazis
Copy link
Collaborator

@skrenes did you ever get to the bottom of this? I haven't had a lot of time to dig into the 2.6.12 changes but if you have a working configuration now I can update the project

@skrenes
Copy link
Author

skrenes commented Nov 11, 2021

@AlecAivazis unfortunately I've been swamped and haven't had a chance to try to problem solve this. For my project, I've simply kept @sveltejs/kit locked on 1.0.0-next.190. My guess is that it'll come down to either moving /$houdini to /src/_$houdini or adding /$houdini to the allow list.

@heliumbrain
Copy link

heliumbrain commented Nov 13, 2021

@skrenes I had a similar issue that I managed to solve by tweaking the Vite conf to this:

vite: {
      server: {
        fs: {
          allow: ['..']
        }
      },
      resolve: {
        alias: {
	  $houdini: path.resolve('.', '$houdini')
	}
      }
},

Reference: https://vitejs.dev/config/#server-fs-allow

Might be worth trying :)

@skrenes
Copy link
Author

skrenes commented Nov 15, 2021

Thanks so much @heliumbrain ! I also appreciate the reference. I tried to specifically allow only the Houdini folder and config directory, but the allow list seems to only respect paths. So I filed this bug: vitejs/vite#5689. In the meantime, I set the allow line to allow: ['.'], rather than allow: ['..'],, since it's technically more restrictive.

@skrenes skrenes closed this as completed Nov 15, 2021
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

3 participants