Skip to content

Set operation on key "value" failed: target is readonly always warned with useTemplateRef #11795

@Cherry

Description

@Cherry

Vue version

3.5.0

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-whst6h?file=src%2Fcomponents%2FHelloWorld.vue

Steps to reproduce

  • open Stackblitz URL
  • wait for build
  • open dev tools
  • observe the following warning:
    [Vue warn] Set operation on key "value" failed: target is readonly. RefImpl {dep: Dep, __v_isRef: true, __v_isShallow: true, _rawValue: input, _value: input}
  • changing the value in the input triggers the warning again

What is expected?

No warning to be logged

What is actually happening?

Unexpected warning is being logged

System Info

via StackBlitz:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vue: ^3.5.0 => 3.5.0 

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