Skip to content

svelte-kit sync fails without ./src/routes directory #5008

@furudean

Description

@furudean

Describe the bug

When svelte-kit sync runs during the prepare hook you're met with this ugly error if you don't have a routes directory in src

> ENOENT: no such file or directory, scandir '/path/to/my/project/src/routes'

If your project primarily uses svelte-kit package then you don't need a routes directory. Since git doesn't clone empty directories the issue is a bit more serious than it seems.

Reproduction

npm init svelte my-app
cd my-app
rm -rf src/routes
npm install

Logs

No response

System Info

N/A

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions