Skip to content

Spurious prop warnings with +page.svelte files #5980

@stephenlrandall

Description

@stephenlrandall

Describe the bug

On each route not using a load function, the console has

[Warning] <Page> was created with unknown prop 'data' (+page.svelte, line ...)
[Warning] <Page> was created with unknown prop 'errors' (+page.svelte, line ...)

These can be removed with the boilerplate

export let data;
export let errors;

in the +page.svelte files for those routes, but ideally the warnings would not be present unless the route has an associated load function.

Reproduction

Launch a SvelteKit app that includes routes which do not explicitly accept data or errors and check the console.

Logs

No response

System Info

System:
    OS: macOS 12.5
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 25.14 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.4.0 - ~/Library/pnpm/node
    npm: 8.12.1 - ~/Library/pnpm/npm
  Browsers:
    Safari: 15.6
  npmPackages:
    @sveltejs/adapter-static: 1.0.0-next.38 => 1.0.0-next.38 
    @sveltejs/kit: next => 1.0.0-next.411 
    svelte: ^3.49.0 => 3.49.0 
    vite: ^3.0.8 => 3.0.8

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions