nuxt / nuxt/devtools

Cannot set properties of null (setting '__vrv_devtools')

Open
#730 8 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.3k
Forks
214
Avg merge
13h 22m
Merged PRs (30d)
18

Description

Environment
  • Operating System: Linux
  • Node Version: v21.7.3
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@
  • Builder: -
  • User Config: modules, app, auth, devServer, server, ssr, runtimeConfig, css, vite
  • Runtime Modules: @sidebase/nuxt-auth@0.6.7
  • Build Modules: -
Reproduction

StackBlitz fork with important files

I can't share the entire project, but I'll be happy to send individual files of interest if it helps solve the problem

Describe the bug

After importing the vue-multiselect library, an error began to occur on every page of the site, this has happened dozens of times before, but the problem magically disappeared or was replaced by another more serious one (see Additional Context)

It looks like a problem with DevTools, but none of the attempts to disable it in development mode have been successful, both in terms of disabling DevTools and in terms of fixing the error.

Additional context

The problem only appears in the browser window, I tried to localize the individual file causing the problem. I can point out that the problem is not related to the /server and /pages directories and is most likely either in the dependencies or in the nuxt.config.ts configuration.

In addition to this, I also previously encountered the “isCE” (https://github.com/nuxt/nuxt/issues/13117) problem, which was solved through “optimizeDeps”

Actions like clearing the cache, regenerating or reinstalling previously did not help

Logs
500
Cannot set properties of null (setting '__vrv_devtools')

at https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/vue-router.js?v=47f21660:1813:35
at Array.forEach ()
at Proxy. (https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/vue-router.js?v=47f21660:1812:27)
at renderComponentRoot (https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/chunk-BVUZKNJ3.js?v=1161d169:2350:17)
at ReactiveEffect.componentUpdateFn [as fn] (https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/chunk-BVUZKNJ3.js?v=1161d169:7466:46)
at ReactiveEffect.run (https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/chunk-BVUZKNJ3.js?v=1161d169:435:19)
at instance.update (https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/chunk-BVUZKNJ3.js?v=1161d169:7597:17)
at setupRenderEffect (https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/chunk-BVUZKNJ3.js?v=1161d169:7607:5)
at mountComponent (https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/chunk-BVUZKNJ3.js?v=1161d169:7375:7)
at processComponent (https://<DOMAIN>/_nuxt/node_modules/.cache/vite/client/deps/chunk-BVUZKNJ3.js?v=1161d169:7329:9)
browser.mjs:44  error [nuxt] error caught during app initialization TypeError: Cannot set properties of null (setting '__vrv_devtools')
    at vue-router.mjs:2466:30
    at Array.forEach (<anonymous>)
    at Proxy.<anonymous> (vue-router.mjs:2464:35)
    at renderComponentRoot (runtime-core.esm-bundler.js:887:16)
    at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:6020:46)
    at ReactiveEffect.run (reactivity.esm-bundler.js:177:19)
    at instance.update (runtime-core.esm-bundler.js:6151:16)
    at setupRenderEffect (runtime-core.esm-bundler.js:6161:5)
    at mountComponent (runtime-core.esm-bundler.js:5929:7)
    at processComponent (runtime-core.esm-bundler.js:5883:9)
log @ browser.mjs:44
_log @ core.mjs:381
resolveLog @ core.mjs:349
_logFn @ core.mjs:377
(anonymous) @ core.mjs:306
(anonymous) @ nuxt.js:98
(anonymous) @ index.mjs:48
(anonymous) @ index.mjs:48
app:error (async)
serialTaskCaller @ index.mjs:46
callHookWith @ index.mjs:198
callHook @ index.mjs:187
handleVueError @ entry.js:6
callWithErrorHandling @ runtime-core.esm-bundler.js:195
handleError @ runtime-core.esm-bundler.js:242
renderComponentRoot @ runtime-core.esm-bundler.js:923
componentUpdateFn @ runtime-core.esm-bundler.js:6020
run @ reactivity.esm-bundler.js:177
instance.update @ runtime-core.esm-bundler.js:6151
setupRenderEffect @ runtime-core.esm-bundler.js:6161
mountComponent @ runtime-core.esm-bundler.js:5929
processComponent @ runtime-core.esm-bundler.js:5883
patch @ runtime-core.esm-bundler.js:5351
componentUpdateFn @ runtime-core.esm-bundler.js:6027
run @ reactivity.esm-bundler.js:177
instance.update @ runtime-core.esm-bundler.js:6151
setupRenderEffect @ runtime-core.esm-bundler.js:6161
mountComponent @ runtime-core.esm-bundler.js:5929
processComponent @ runtime-core.esm-bundler.js:5883
patch @ runtime-core.esm-bundler.js:5351
mountChildren @ runtime-core.esm-bundler.js:5599
mountElement @ runtime-core.esm-bundler.js:5506
processElement @ runtime-core.esm-bundler.js:5471
patch @ runtime-core.esm-bundler.js:5339
componentUpdateFn @ runtime-core.esm-bundler.js:6027
run @ reactivity.esm-bundler.js:177
instance.update @ runtime-core.esm-bundler.js:6151
setupRenderEffect @ runtime-core.esm-bundler.js:6161
mountComponent @ runtime-core.esm-bundler.js:5929
processComponent @ runtime-core.esm-bundler.js:5883
patch @ runtime-core.esm-bundler.js:5351
mountSuspense @ runtime-core.esm-bundler.js:1260
process @ runtime-core.esm-bundler.js:1200
patch @ runtime-core.esm-bundler.js:5376
componentUpdateFn @ runtime-core.esm-bundler.js:6027
run @ reactivity.esm-bundler.js:177
instance.update @ runtime-core.esm-bundler.js:6151
setupRenderEffect @ runtime-core.esm-bundler.js:6161
mountComponent @ runtime-core.esm-bundler.js:5929
processComponent @ runtime-core.esm-bundler.js:5883
patch @ runtime-core.esm-bundler.js:5351
render2 @ runtime-core.esm-bundler.js:6672
mount @ runtime-core.esm-bundler.js:3938
app.mount @ runtime-dom.esm-bundler.js:1535
initApp @ entry.js:8
await in initApp (async)
(anonymous) @ entry.js:10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproduction and inspect the browser stack in vue-router.js around the __vrv_devtools assignment. Compare the nuxt.config.ts and dependency setup, including vue-multiselect and optimizeDeps, while checking whether DevTools is involved. Done means the reproduction initializes in the browser without the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, nuxt, typescript, vite
Domain
developer-experience, frontend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.