Skip to content

use reactivity api in node JS gives: ReferenceError: document is not defined #657

Closed
@mesqueeb

Description

@mesqueeb

Version

3.0.0-alpha.3

Reproduction link

https://github.com/vue-sync/core

Steps to reproduce

  1. npm i
  2. npm run test

What is expected?

the test should run

What is actually happening?

the test fails to run with a "1 uncaught exception".
Error:

Uncaught exception in test/registerPlugin.ts

node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:7

ReferenceError: document is not defined

Object. (node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:7:13)
Object. (node_modules/@vue/runtime-dom/index.js:6:20)


I'm trying to use Vue 3's reactivity api to make a reactive object without needing to rely on the DOM.
The test runs via node, I tried to make sure to use node v13.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions