You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
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
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 🤞
@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
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
The text was updated successfully, but these errors were encountered: