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

all defineComponent are ignored. #25706

Closed
ChurikiTenna opened this issue Feb 9, 2024 · 1 comment
Closed

all defineComponent are ignored. #25706

ChurikiTenna opened this issue Feb 9, 2024 · 1 comment

Comments

@ChurikiTenna
Copy link

ChurikiTenna commented Feb 9, 2024

Environment


  • Operating System: Darwin
  • Node Version: v18.0.0
  • Nuxt Version: 3.10.1
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.1
  • Package Manager: yarn@3.2.3
  • Builder: -
  • User Config: devtools, plugins, app
  • Runtime Modules: -
  • Build Modules: -

Reproduction

$ yarn create nuxt-app your-app-name

add this to index.vue

<template>
    <div>
        Text
    </div>
</template>

<script lang="ts">
console.log("Start!!");
export default defineComponent({
  mounted() {
    console.log("Mounted!!");
  },
})
</script>

$ yarn dev

Describe the bug

I was testing my 1 year old project, and noticed the inside of defineComponent are not triggered at all.

I created a new blank page as shown above.
There is "Start!!" on console, but no "Mounted!!".

Same for the new project I created.

Console shows this error:
Failed to load resource: the server responded with a status of 504 (Outdated Optimize Dep)

Additional context

I tried:

rm -r node_modules
rm -r yarn.lock
yarn install

Logs

No response

@ChurikiTenna ChurikiTenna changed the title <script> are ignored on every page. all defineComponent are ignored. Feb 9, 2024
@manniL
Copy link
Member

manniL commented Feb 9, 2024

image
Works fine for me. Be aware that mounted runs only on the client-side, so you will see the logs in browser only.

@manniL manniL closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
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