Skip to content

onMounted in setup script not working. #90

@St2r

Description

@St2r

Environment

RootDir: /Users/st2r/Projects/plagiarism-checker/web 02:34:49
Nuxt project info: 02:34:49


  • Operating System: Darwin
  • Node Version: v17.2.0
  • Nuxt Version: 3.0.0-27439932.78761c2
  • Package Manager: yarn@1.22.17
  • Bundler: Vite
  • User Config: css, build, ssr, env
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/St2r/plagiarism-checker

The Code is under directory /web. Thank you

Describe the bug

Using onMounted lifecycle in /web/pages/index.vue went error while SSR. I tried to insert debugger or alert inside onMounted, but nothing happened.

Additional context

No response

Logs

[Vue warn]: onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions