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

Cannot redeclare block-scoped variable '$crumbs' #3555

Closed
sandikodev opened this issue Oct 28, 2022 · 2 comments
Closed

Cannot redeclare block-scoped variable '$crumbs' #3555

sandikodev opened this issue Oct 28, 2022 · 2 comments

Comments

@sandikodev
Copy link

i have little pieces of code

<!-- pages.vue -->

<script lang="ts" setup>
const { $crumbs } = useNuxtApp()
$crumbs.set([
  { name: 'Home', to: '/' },
  { name: 'Pages', to: '/pages' },
])
</script>
<template>
...
</template>

then vetur shows me an error
Cannot redeclare block-scoped variable '$crumbs'.

[{
	"resource": "/home/dev/project/kerja/dashboard/src/pages/pages.vue",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": "2451",
	"severity": 8,
	"message": "Cannot redeclare block-scoped variable '$crumbs'.",
	"source": "Vetur",
	"startLineNumber": 4,
	"startColumn": 9,
	"endLineNumber": 4,
	"endColumn": 16
}]
@yoyo930021
Copy link
Member

We don't support <script setup> now.
Duplicate of #2296

@yoyo930021
Copy link
Member

Duplicate of #2296

@yoyo930021 yoyo930021 marked this as a duplicate of #2296 Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants