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

mailto links broke with 1.0.0-next.200 #2909

Closed
philippdormann opened this issue Nov 24, 2021 · 4 comments · Fixed by #2915 · May be fixed by naiba4/kit#1
Closed

mailto links broke with 1.0.0-next.200 #2909

philippdormann opened this issue Nov 24, 2021 · 4 comments · Fixed by #2915 · May be fixed by naiba4/kit#1
Labels
bug Something isn't working p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc.
Milestone

Comments

@philippdormann
Copy link

Describe the bug

when running npm run build on a kit@1.0.0-next.200 project, the build fails when processing mailto: links.

I think the commit f12bbcc (is_root_relative helper) might be related to this issue

Reproduction

https://stackblitz.com/github/philippdormann/sveltekit-next-200-reproduction-mailto

https://github.com/philippdormann/sveltekit-next-200-reproduction-mailto

Logs

✓ 14 modules transformed.
.svelte-kit/output/server/app.js                      0.07 KiB
.svelte-kit/output/server/chunks/app-15aed414.js      48.53 KiB
.svelte-kit/output/server/chunks/layout-16a4b7f3.js   0.23 KiB
.svelte-kit/output/server/chunks/error-1cd6baa4.js    0.71 KiB
.svelte-kit/output/server/chunks/index-13515498.js    0.24 KiB

Run npm run preview to preview your production build locally.

> Using @sveltejs/adapter-static
> ENOENT: no such file or directory, mkdir 'build/mailto:hi@example.com'
Error: ENOENT: no such file or directory, mkdir 'build/mailto:hi@example.com'

System Info

❯ npx envinfo --system --binaries --browsers --npmPackages "{svelte,@sveltejs/*,vite}"

  System:
    OS: Windows 10 10.0.22000
    CPU: (6) x64 Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz
    Memory: 16.98 GB / 31.94 GB
  Binaries:
    Node: 17.0.1 - ~\AppData\Local\Volta\tools\image\node\17.0.1\node.EXE
    Yarn: 1.22.11 - ~\AppData\Local\Volta\tools\image\yarn\1.22.11\bin\yarn.CMD
    npm: 8.1.0 - ~\AppData\Local\Volta\tools\image\node\17.0.1\npm.CMD
  Browsers:
    Chrome: 96.0.4664.45
    Edge: Spartan (44.22000.120.0), Chromium (96.0.1054.34), ChromiumDev (93.0.910.5)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    @sveltejs/adapter-static: 1.0.0-next.21 => 1.0.0-next.21
    @sveltejs/kit: 1.0.0-next.200 => 1.0.0-next.200
    svelte: ^3.44.0 => 3.44.2

Severity

annoyance

Additional Information

everything works fine on 1.0.0-next.199

@antony antony added the bug Something isn't working label Nov 24, 2021
@tonprince
Copy link

tonprince commented Nov 25, 2021

I had exactly the same issue, with mailto and tel links, and also parent-child related links where parent URL does not exist. #2913

@seppegadeyne
Copy link

Experiencing same issue with mailto and tel links, 1.0.0-next.199 works fine.

@antony antony added the p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc. label Nov 25, 2021
@benmccann benmccann added this to the 1.0 milestone Nov 25, 2021
Rich-Harris added a commit that referenced this issue Nov 25, 2021
* ignore hrefs with a scheme - fixes #2909

* changeset
@Rich-Harris
Copy link
Member

thanks — fixed in 201

@Ladvace
Copy link

Ladvace commented Jun 18, 2022

I'm getting the same following error while using a mailto: URL in the goto function:

Uncaught (in promise) TypeError: Failed to construct 'URL': Invalid URL

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants