question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The setup binding property "..." is already declared - New Nuxt project

See original GitHub issue

Environment

Operating System: Linux Node Version: v16.15.0 Nuxt Version: v2.15.8 Package Manager: npm@8.5.5 Builder: webpack - v4.46.0 Modules: core-js@3.19.3, vue@2.6.14, vue-server-renderer@2.6.14, vue-template-compiler@2.6.14, @nuxt/bridge@3.0.0-27545203.75e046f

Reproduction

  1. Create Nuxt project npm init nuxt-app template

nuxt project

  1. Configure how the guide: https://v3.nuxtjs.org/bridge/overview/

  2. Configure the Nuxt.config file:

bridge: {
    vite: false,
    nitro: false
  }
  1. Create Counter component
<template>
  <div>
    <h1>Index page</h1>
    <button @click="increment">
      Counter is: {{ state.count }}
    </button>
  </div>
</template>

<script setup>

const state = reactive({ count: 0 })

function increment () {
  state.count++
}

</script>

<script>
export default {
  name: 'CounterComponent'
}
</script>

Describe the bug

When updating the page the following warnings by console appear:

warn

It can be noted that it comes from the Nuxt SSR.

Additional context

When configuring the nuxt.config file:

bridge: {
     …
     ssr: false
}

Warning disappear.

Logs

[Vue warn]: The setup binding property "state" is already declared.
[Vue warn]: The setup binding property "increment" is already declared.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nehuenpereyracommented, May 27, 2022

I tried with #347 and the bug persists.

0reactions
danielroecommented, Jul 4, 2022

I cannot reproduce this: https://stackblitz.com/edit/github-8l1edb. If you’re still experiencing it, would you create a reproduction please? 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Vue warn]: The setup binding property "xxx" is already ...
I run the following code and the console prompts me: [Vue warn]: The setup binding property "state" is already declared. [Vue warn]: The...
Read more >
The data property "article" is already declared as a prop. Use ...
vuejs2 - The data property "article" is already declared as a prop. Use prop default value instead - Stack Overflow. Stack Overflow for...
Read more >
Configuration - Nuxt
The css Property ... Nuxt lets you define the CSS files/modules/libraries you want to set globally (included in every page). In case you...
Read more >
Vue 3.2 - Using Composition API with Script Setup
Introduction. Vue 3 introduced the Composition API as a new way to work with reactive state in a Vue application.
Read more >
Understanding the new script setup with (defineProps ... - Netlify
Learn the fundamentals of Vue 3.2 script setup feature with special APIs like defineProps and defineEmits.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found