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: Build breaks when updating from 1.0.0-beta.44 (Inside a monorepo) #3738

Closed
1 task
marcosmartini opened this issue Jun 28, 2022 · 5 comments
Closed
1 task
Assignees
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)

Comments

@marcosmartini
Copy link

What version of astro are you using?

1.0.0-beta.57

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

When updating a project from 1.0.0-beta.44, the build and dev server breaks with the following error:

const name = parts[1].replace(".git", "");
TypeError: Cannot read properties of undefined (reading 'replace') at get projectMetadata [as projectMetadata]

This seems to be coming from node_modules/@astrojs/telemetry/dist/index.js:123:29

Downgrading from beta.44 works, but I tested all beta versions from 44 and up and they all break the build/dev with the same message.

I don't see the error if I start a project using the CLI (latest beta version) and then downgrade to 44 and try to upgrade – everything works fine – but I can see the error when working in our project that currently uses beta 44.

I'm adding a StackBliz link below so I can send this bug but you cannot see the problem since the projects are initialized with the latest beta version.

Link to Minimal Reproducible Example

https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal?file=README.md

Participation

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

Update: I forgot to mention that our Astro project lives in a monorepo - this seems to be causing the error, since when I move the project folder out of the monorepo, it works as expected. Likewise, if I create a brand new project inside the monorepo using the Astro CLI, the error occurs.

@marcosmartini marcosmartini changed the title 🐛 BUG: Build breaks when updating from 1.0.0-beta.44 🐛 BUG: Build breaks when updating from 1.0.0-beta.44 (Inside a monorepo) Jun 28, 2022
@tony-sull
Copy link
Contributor

Thanks for filing this @marcosmartini! We're looking into this now, build breaks jump to the top of our list 👍

Looks like we may have gotten lucky here - Fred actually just refactored the @astrojs/telemetry and it looks like the problematic code here was removed completely 🤞

@tony-sull tony-sull added - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) s1-small labels Jun 28, 2022
@tony-sull tony-sull self-assigned this Jun 28, 2022
@tony-sull
Copy link
Contributor

@marcosmartini can you try updating to the beta.58 release that just went out? That includes a new release of @astrojs/telemetry that was a pretty big refactor and code cleanup, including removing the projectMetadata getter completely

@marcosmartini
Copy link
Author

Hey @tony-sull - I just updated to 58 and everything seems to be working now! Thanks for that!

@tony-sull
Copy link
Contributor

Glad that did the trick! Thanks for confirming and following up here 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Projects
None yet
Development

No branches or pull requests

2 participants