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

ci: update error reference docs #2518

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/pages/en/reference/error-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The following reference is a complete list of the errors you may encounter while
- [**NoAdapterInstalled**](/en/reference/errors/no-adapter-installed/) (E03017)<br/>Cannot use Server-side Rendering without an adapter.
- [**NoMatchingImport**](/en/reference/errors/no-matching-import/) (E03018)<br/>No import found for component.
- [**InvalidPrerenderExport**](/en/reference/errors/invalid-prerender-export/) (E03019)<br/>Invalid prerender export.
- [**InvalidComponentArgs**](/en/reference/errors/invalid-component-args/) (E03020)<br/>Invalid component arguments.
- [**FailedToLoadModuleSSR**](/en/reference/errors/failed-to-load-module-ssr/) (E04001)<br/>Could not import file.
- [**InvalidGlob**](/en/reference/errors/invalid-glob/) (E04002)<br/>Invalid glob pattern.
## CSS Errors
Expand Down
24 changes: 24 additions & 0 deletions src/pages/en/reference/errors/invalid-component-args.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs'
# Do not make edits to it directly, they will be overwritten.
# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
# Translators, please remove this note and the <DontEditWarning/> component.

layout: ~/layouts/MainLayout.astro
title: Invalid component arguments.
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---
import DontEditWarning from '../../../../components/DontEditWarning.astro'

<DontEditWarning />


> **Example error messages:**<br/>
InvalidComponentArgs: Invalid arguments passed to `<MyAstroComponent>` component. (E03020)

## What went wrong?
Astro components cannot be rendered manually via a function call, such as `Component()` or `{items.map(Component)}`. Prefer the component syntax `<Component />` or `{items.map(item => <Component {...item} />)}`.