I am trying to run the code of my script.js tab in a project im making.
Because previously i installed node.js, now all my js files run with the node output, which
doesnt let me use dom elements.
This is the error code.
c:UsersNicolásDesktopGatoprojectoscript.js:2
const gatoCajas=document.getElementById("gatoContainer");
^
ReferenceError: document is not defined
at Object.<anonymous> (c:UsersNicolásDesktopGatoprojectoscript.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
Node.js v18.13.0
This is not the problem of course, i know node cant run dom elements, i just want to stop using node
in the output.
I looked up how to do this but i could not find someone solving this, or maybe i didnt look well enough.