#rss

3 messages · Page 1 of 1 (latest)

lethal patio
#

[14:43:35] Running build in Cleveland, USA (East) – cle1
[14:43:35] Cloning github.com/juanppdev/docs.mundodev (Branch: main, Commit: 8912cfe)
[14:43:36] Cloning completed: 347.228ms
[14:43:37] Restored build cache
[14:43:37] Running "vercel build"
[14:43:37] Vercel CLI 29.3.6
[14:43:38] Installing dependencies...
[14:43:39]
[14:43:39] up to date in 710ms
[14:43:39]
[14:43:39] 179 packages are looking for funding
[14:43:39] run npm fund for details
[14:43:39] Detected package-lock.json generated by npm 7+...
[14:43:39] Running "npm run build"
[14:43:39]
[14:43:39] > build
[14:43:39] > astro build
[14:43:39]
[14:43:41] 12:43:41 PM [content] Types generated 391ms
[14:43:41] 12:43:41 PM [build] output target: static
[14:43:41] 12:43:41 PM [build] Collecting build info...
[14:43:41] 12:43:41 PM [build] Completed in 433ms.
[14:43:41] 12:43:41 PM [build] Building static entrypoints...
[14:43:42] 12:43:42 PM [build] Completed in 1.51s.
[14:43:42]
[14:43:42] building client
[14:43:43] Completed in 224ms.
[14:43:43]
[14:43:43]
[14:43:43] generating static routes
[14:43:43] ▶ src/pages/index.astro
[14:43:43] └─ /index.html (+22ms)
[14:43:43] λ src/pages/rss.xml.js
[14:43:43] error [RSS] Invalid or missing options:
[14:43:43] Invalid input (items)
[14:43:43] File:
[14:43:43] /vercel/path0/node_modules/@astrojs/rss/dist/index.js:40:26
[14:43:43] Code:
[14:43:43] 39 | }
[14:43:43] > 40 | const formattedError = new Error(
[14:43:43] | ^
[14:43:43] 41 | [
[14:43:43] 42 | [RSS] Invalid or missing options:,
[14:43:43] 43 | ...parsedResult.error.errors.map(
[14:43:43] Stacktrace:
[14:43:43] Error: [RSS] Invalid or missing options:
[14:43:43] Invalid input (items)
[14:43:43] at validateRssOptions (file:///vercel/path0/node_modules/@astrojs/rss/dist/index.js:40:26)
[14:43:43] at async getRSS (file:///vercel/path0/node_modules/@astrojs/rss/dist/index.js:30:31)
[14:43:43] at async callEndpoint (file:///vercel/path0/node_modules/astro/dist/core/endpoint/index.js:82:16)
[14:43:43] at async generatePath (file:///vercel/path0/node_modules/astro/dist/core/build/generate.js:329:20)
[14:43:43] at async generatePage (file:///vercel/path0/node_modules/astro/dist/core/build/generate.js:144:5)
[14:43:43] at async generatePages (file:///vercel/path0/node_modules/astro/dist/core/build/generate.js:79:7)
[14:43:43] at async staticBuild (file:///vercel/path0/node_modules/astro/dist/core/build/static-build.js:83:7)
[14:43:43] at async AstroBuilder.build (file:///vercel/path0/node_modules/astro/dist/core/build/index.js:124:5)
[14:43:43] at async AstroBuilder.run (file:///vercel/path0/node_modules/astro/dist/core/build/index.js:156:7)
[14:43:43] at async build (file:///vercel/path0/node_modules/astro/dist/core/build/index.js:37:3)
[14:43:43] at async runCommand (file:///vercel/path0/node_modules/astro/dist/cli/index.js:167:14)
[14:43:43] at async cli (file:///vercel/path0/node_modules/astro/dist/cli/index.js:209:5)
[14:43:43]
[14:43:43] Error: Command "npm run build" exited with 1
[14:43:43] BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1

worn pikeBOT
#

Hi @lethal patio. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

It seems like you're encountering an error related to the RSS feed generation in your Astro project. The error message indicates that there is an issue with the items option in your rss.xml.js file.

To fix this issue, you need to make sure that the items option is properly configured. Here's an example of how to set up the items option using the pagesGlobToRssItems function:

import rss, { pagesGlobToRssItems } from '@astrojs/rss';

export async function get() {
  return rss({
    title: 'Astro Learner | Blog',
    description: 'My journey learning Astro',
    site: 'https://my-blog-site.netlify.app',
    items: await pagesGlobToRssItems(import.meta.glob('./**/*.md')),
    customData: `<language>en-us</language>`,
  });
}

Make sure your rss.xml.js file is similar to the example above, and that the items option is correctly set up. If you're still encountering issues, please double-check your project configuration and ensure that you're using the correct version of Astro and its dependencies.

Source: Astro Documentation - Add an RSS feed (https://docs.astro.build/en/tutorial/5-astro-api/4#create-an-xml-feed-document)

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

Astro Documentation

Tutorial: Build your first Astro blog —
Install Astro's official package for creating a feed that your readers can subscribe to