Is this due to a problem with node running locally or some other reason? I read some similar questions but couldn't find a solution
迷茫2017-06-12 09:31:15
The global variable window does not exist in node.js.
Window is a browser specification, not a js language specification, so of course it cannot be used in nodejs.
However, nodejs has a similar global variable called golgal, but its internal content is very different from the window in the browser.