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

🐛 BUG: RSS "Cannot read properties of undefined (reading 'replace')" #3846

Closed
1 task done
zellwk opened this issue Jul 7, 2022 · 4 comments
Closed
1 task done
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@zellwk
Copy link

zellwk commented Jul 7, 2022

What version of astro are you using?

1.0.0-beta.64

Are you using an SSR adapter? If so, which one?

No

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

The RSS plugin throws an error that says "Cannot read properties of undefined (reading 'replace')" even when all necessary parameters are included.

CleanShot 2022-07-07 at 18 46 58

I traced the error to /rss/dist/index.js. It looks like createCanonicalURL was called either without url or base.

CleanShot 2022-07-07 at 18 49 08

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-f6teq2?file=package.json

Participation

  • I am willing to submit a pull request for this issue.
@zellwk
Copy link
Author

zellwk commented Jul 7, 2022

Additional problem: import.meta.env.SITE remains undefined even if site is specified in astro.config.mjs.

I didn't include in the above issue because this wasn't a big blocker. The above error is a blocker.

@aFuzzyBear aFuzzyBear changed the title 🐛 BUG: 🐛 BUG: RSS "Cannot read properties of undefined (reading 'replace')" Jul 7, 2022
@natemoo-re natemoo-re added s1-small - P4: important Violate documented behavior or significantly impacts performance (priority) labels Jul 8, 2022
@matthewp matthewp self-assigned this Jul 12, 2022
@matthewp
Copy link
Contributor

@zellwk For your RSS issue, a link is required for each item. I'll update this to provide a better error message.

@zellwk
Copy link
Author

zellwk commented Jul 14, 2022

Ah, got it. I thought you were supposed to provide a slug instead of link. Thanks.

@matthewp
Copy link
Contributor

@zellwk if you're still having the env.SITE issue can you open a separate bug. I confirmed that we do have a test for this, so there must be something different about your setup. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

No branches or pull requests

3 participants