Nodejs references the js script file, but the js script file execution environment is how nodejs can successfully reference the js script in window,.

in nodejs:

var bc = require("./***.js");
---
Error: [vue-test-utils]:window is undefined, vue-text-utils needs to be run in a browser enviroment.
you can run the tests in node using jsdom + jsdom-gbloal.``
Mar.04,2021

  

maybe your code contains parts that need window objects, and if it doesn't matter, just remove or replace them.

Menu