-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Astro Check Errors - Only when using React #6631
Comments
Can you provide a minimal reproduction? The provided example is a full app it seems. |
I get errors using
error trace
system detailsPackages:
SSR Package Manager OS Browser |
Yeah something definitely seems up with React in Astro projects. cc @matthewp |
@matthewp or @ematipico - If it helps at all, I would be happy to hop in a Discord/zoom/call to troubleshoot and show you what I'm experiencing. I would then be happy to write up our findings in this issue so they are documented publicly and others can follow along with our results. |
@GrantBirki I checked with the team, here's the findings:
@kodumbeats, I suggest opening a different issue. Your problem is unrelated to this issue. |
@ematipico Thanks for reviewing! I found a more relevant ticket (6306) that I missed on my first pass through open issues 🙈 so I'll move my report there. |
@ematipico Do you have any reference to this or links? It would be nice if there was a way to suppress this error if it is indeed "harmless" because I don't like the color "red" in my production pipeline unless there is something actually going wrong 😄 |
@bluwy would you mind chiming in? |
@GrantBirki it was fixed in vitejs/vite#12358 and should be gone when you upgrade Astro's internal Vite dep to v4.2. You can run |
@bluwy Thank you for the suggestion! I checked out the PR you linked and it looks like that is exactly what I need to suppress the error. It looks like |
Yep! Usually we bump the internal Vite version when we rely on a certain features on that version. I think npm/pnpm would pull the latest version of Vite by default, as long as it respects the semver range. |
|
This issue doesn't happen on |
FWIW this error doesn't appear for me any more on the latest version of |
What version of
astro
are you using?2.1.2
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows, Linux, and MacOS - All the same error
What browser are you using?
Chrome and Brave
Describe the Bug
When running
astro check
, I am seeing errors displayed in my terminal ever since adding React components into my project. I added React functionality by closely following the official Astro docs.What is really strange, is that these errors are also shown in
build
command with Astro but the build still successfully completes and my sites are all deployed. In fact, I didn't even know these errors were happening until I checked my GitHub Actions build logs and saw them in there. All the sites I am deploying and using Astro have these "error" messages (that are using React) but they are deployed fine and have no visible issues.Here are the errors I'm seeing and how to recreate them
Clone this template repository
Install npm packages
Run a build and view the error:
As you can see in the logs above, the build completes successfully, but there is an odd line in the output ->
X [ERROR] The build was canceled
.Running
astro check
shows some additional infoAdditional Details
The pull request that added React components to my repository when things broke
Actions logs showing the error. This is where I traced things back to the Actions workflow when things first started acting weird
Link to Minimal Reproducible Example
https://github.com/grantbirki/astrowind
Participation
The text was updated successfully, but these errors were encountered: