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

i tried to generate. idk what's wrong #157

Open
fountainpen opened this issue Oct 23, 2023 · 8 comments
Open

i tried to generate. idk what's wrong #157

fountainpen opened this issue Oct 23, 2023 · 8 comments

Comments

@fountainpen
Copy link

▶ src/pages/index.astro
  └─ /index.html (+73ms)
λ src/pages/rss.xml.ts
 error   [RSS] Invalid or missing options:
  Invalid input (items)
  File:
    src/pages/rss.xml.ts
  Stacktrace:
Error: [RSS] Invalid or missing options:
Invalid input (items)
    at validateRssOptions (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/@astrojs+rss@3.0.0/node_modules/@astrojs/rss/dist/index.js:46:26)
    at async getRssString (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/@astrojs+rss@3.0.0/node_modules/@astrojs/rss/dist/index.js:38:31)
    at async getRssResponse (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/@astrojs+rss@3.0.0/node_modules/@astrojs/rss/dist/index.js:30:21)
    at async callEndpoint (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/astro@3.1.3_@types+node@20.4.7/node_modules/astro/dist/core/endpoint/index.js:105:16)
    at async #tryRenderRoute (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/astro@3.1.3_@types+node@20.4.7/node_modules/astro/dist/core/pipeline.js:108:24)
    at async BuildPipeline.renderRoute (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/astro@3.1.3_@types+node@20.4.7/node_modules/astro/dist/core/pipeline.js:46:20)
    at async generatePath (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/astro@3.1.3_@types+node@20.4.7/node_modules/astro/dist/core/build/generate.js:410:16)
    at async generatePage (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/astro@3.1.3_@types+node@20.4.7/node_modules/astro/dist/core/build/generate.js:231:5)
    at async generatePages (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/astro@3.1.3_@types+node@20.4.7/node_modules/astro/dist/core/build/generate.js:144:9)
    at async staticBuild (file:///C:/Users/Parsifal/astro-paper-3.0.0/node_modules/.pnpm/astro@3.1.3_@types+node@20.4.7/node_modules/astro/dist/core/build/static-build.js:85:7)
@jbrr
Copy link

jbrr commented Nov 1, 2023

is this the repo that threw that error? https://github.com/fountainpen/astro-paper

if so, I'm pretty sure you just named something wrong in your post schema. pubDate is a required parameter, but it's named pubDatetime in your repo.

@fountainpen
Copy link
Author

isnt it the problem in rss????

@jbrr
Copy link

jbrr commented Nov 2, 2023

yes, your content doesn't match the schema for an rss feed item, so it blows up when you try to create a feed. did you look in the astro source code at the file and line number from the first line of the stack trace?

did you try changing the name of that attribute?

@jbrr
Copy link

jbrr commented Nov 2, 2023

ohh, i'm sorry @fountainpen, I didn't realize that attribute was named wrong in this repo. i had assumed that was a custom schema you had put together for some reason 🤦‍♂️

@fountainpen
Copy link
Author

so basically there should be a ull request to fix that, huh?
if yes, pls make it.

@jbrr
Copy link

jbrr commented Nov 2, 2023

it seems easy enough, but i can't replicate your issue. when you say you "tried to generate," do you mean you ran the astro build command?

@fountainpen
Copy link
Author

it seems easy enough, but i can't replicate your issue. when you say you "tried to generate," do you mean you ran the astro build command?

that's right

@jbrr
Copy link

jbrr commented Nov 2, 2023

I think I might be wrong. That parameter is actually changed to the proper pubDate before it's sent to the @astro/rss library: https://github.com/satnaing/astro-paper/blob/main/src/pages/rss.xml.ts#L18

Since I can't replicate the issue, and because I'm pretty busy at work right now, I don't think I'll have the time to dig into it any further, but I hope you figure it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants