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

Vue appEntrypoint not working #9330

Closed
1 task
ffxsam opened this issue Dec 5, 2023 · 7 comments · Fixed by #9333
Closed
1 task

Vue appEntrypoint not working #9330

ffxsam opened this issue Dec 5, 2023 · 7 comments · Fixed by #9333
Assignees
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) pkg: vue Related to Vue (scope)

Comments

@ffxsam
Copy link
Contributor

ffxsam commented Dec 5, 2023

Astro Info

Astro                    v4.0.1
Node                     v18.16.0
System                   macOS (arm64)
Package Manager          pnpm
Output                   server
Adapter                  astro-sst
Integrations             @astrojs/vue
                         vuetify

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I'm not able to specify a Vue entry point like I could in Astro 2.x and 3.x, despite following the docs.

What's the expected result?

I expected my app to load up properly.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-y49v7g?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Dec 5, 2023
@natemoo-re natemoo-re added pkg: vue Related to Vue (scope) - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) labels Dec 5, 2023
@natemoo-re natemoo-re self-assigned this Dec 5, 2023
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Dec 5, 2023
@natemoo-re
Copy link
Member

This was a regression introduced in #8794! I unfortunately didn't catch it before the release went out.

I've opened #9333 with a fix. It's unlikely to get merged immediately, but you can pin "@astrojs/vue": "4.0.0" in your package.json file in the meantime.

@ffxsam
Copy link
Contributor Author

ffxsam commented Dec 6, 2023

I appreciate your prompt help with this—as always! 🙌

@szv
Copy link

szv commented Dec 8, 2023

@ffxsam Is it working for you now?

I am using astroV4.0.3 with @astrojs/vueV4.0.2 and vuejsV3.3.11 and still get the warning [@astrojs/vue] Unable to resolve appEntrypoint /src/vue-main. Does the file exist?

I configured the appEntrypoint like this:
/astro.config.mjs

,
integrations: [
  ...,
  vue({ appEntrypoint: '/src/vue-main' })
]

/src/vue-main.js

export default (app) => {
  // ...
}

@ffxsam
Copy link
Contributor Author

ffxsam commented Dec 8, 2023

@szv I believe the bug lies in @astrojs/vue, not astro. And I haven't seen an update come through for that yet, so you'll have to pin @astrojs/vue at 4.0.0 for now.

@szv
Copy link

szv commented Dec 8, 2023

@ffxsam Thank you for your answer. But for me it doesn't work with 4.0.0 eighter 😅
I think I will have to wait for future versions.

@AngeloFornerino
Copy link

Hi @natemoo-re , has there been any progress on this issue? I continue to encounter the same problem. After updating @astrojs/vue to version 4.0.0, the build completes without issues. However, as soon as I open the webpage, the error returns.

Error message:
ReferenceError: Cannot access '_export_sfc' before initialization

@AngeloFornerino
Copy link

I was able to eliminate the error, which was related to the import from "astro/zod". By switching them back to "astro:content", the error disappeared. This is peculiar because there's a warning in the console that says:

"astro:content is only supported when running server-side. Using it in the browser will result in bloated bundles and slower page loading times. It will not be supported in the future."

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) pkg: vue Related to Vue (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants