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

Problems with tsx template after updating to v9 #3208

Closed
cernymatej opened this issue Nov 6, 2024 · 2 comments · Fixed by #3214
Closed

Problems with tsx template after updating to v9 #3208

cernymatej opened this issue Nov 6, 2024 · 2 comments · Fixed by #3214

Comments

@cernymatej
Copy link
Contributor

cernymatej commented Nov 6, 2024

Environment

  • Operating System: Darwin
  • Node Version: v20.9.0
  • Nuxt Version: 3.13.1
  • CLI Version: 3.13.1
  • Nitro Version: 2.9.7
  • Package Manager: pnpm@9.9.0
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxtjs/i18n@9.0.0
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-ffpcjt?file=nuxt.config.ts,components%2FTestComponent.vue,app.vue

Describe the bug

After upgrading from 8.5.3 to v9, I encountered several pre-transform errors. In my main project, it was the following error message: Pre-transform error: '>' expected. I tracked this down to an issue with parsing TSX templates.

While stripping down the project to identify the root cause, I also encountered the following errors:

ERROR  Internal server error: ',' expected.
   10:26:17 AM
  Plugin: unplugin-vue-i18n:directive

and

Pre-transform error: Type expected.

The last one is present in the minimal reproduction linked above.

This issue wasn’t present in 8.5.3. I suspect it might be an upstream bug. However, I'm not sure where to report it.

Additional context

This seems to work fine:

<script lang="ts">
export default defineComponent((props, ctx) => {
  return () => h('div', ['Test'])
})
</script>

Logs

No response

@BobbieGoede
Copy link
Collaborator

This is likely an upstream bug as you suspect, probably unplugin-vue-i18n, could you open an issue on its repository? https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n 🙏

Let's leave this issue open while the upstream issue exists, there's probably more users running into this while updating.

@cernymatej
Copy link
Contributor Author

For anyone interested in tracking this issue, here is the link: intlify/bundle-tools#402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants