Skip to content

[vite-plugin-svelte-kit] Cannot read properties of undefined (reading 'paths') error during build #5487

Closed
@justingolden21

Description

@justingolden21

Describe the bug

When running npm run build this appears:

[vite-plugin-svelte-kit] Cannot read properties of undefined (reading 'paths') error during build

The cause is having a file with the same name and .js and .ts extensions in the same directory.

This took me three hours of my time to figure out, and I could not find a single answer anywhere online. I had to switch branches, stash, manually cut and paste hundreds of files, all because this error message was shown.

If we could instead show something along the lines of "Cannot have duplicate file names: {path/to/files}{filename} "

Reproduction

The cause is having a file with the same name and .js and .ts extensions in the same directory.

Logs

No response

System Info

Windows 10

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions