globalThis is not defined although node version is v14.4.0

2021-03-24 Thread lotib48819
ok. I see I have two installed on my machine... when I type $ node -v 14.4.0 $ nodejs -v v10.19.0 I remember i installed nodejs only though nvm but it looks i have two nodejs now on Ubuntu

globalThis is not defined although node version is v14.4.0

2021-03-24 Thread timothee
ok; so next step is figure out if it's a user error, or if `findNodeJs` is buggy, or if findExe is buggy (findExe has many bugs, but maybe this isn't related) proc findNodeJs*(): string {.inline.} = ## Find NodeJS executable and return it as a string. result = findExe("

globalThis is not defined although node version is v14.4.0

2021-03-23 Thread lotib48819
interesting. running `node main.js` it works. Maybe by default it is using a wrong node version. I have nvm and I do have multiple node versions installed including v14, v12, v9 and v8.

globalThis is not defined although node version is v14.4.0

2021-03-23 Thread timothee
@lotib48819 I can't reproduce your issue, please provide more info: * nim -v * cat main.nim (minimize it first) * which OS, etc * does the generated code (without -d:nodejs) work in browser * node -v (you already did, but double check) * try also running `node main.js` directly with ma

globalThis is not defined although node version is v14.4.0

2021-03-23 Thread juancarlospaco

globalThis is not defined although node version is v14.4.0

2021-03-23 Thread lotib48819
`nim js -d:nodejs -r main.nim` I get this error message ReferenceError: globalThis is not defined Run If you experience errors saying that globalThis is not defined, be sure to run a recent version of Node.js (at least 12.0). node -v v14.4.0 Any ideas? Also, will t

globalThis is not defined although node version is v14.4.0

2021-03-23 Thread Yardanico
The "var F" thing has nothing to do with the browser, it's the stack trace entries, they work fine in the browser as well as in Node.

globalThis is not defined although node version is v14.4.0

2021-03-23 Thread lotib48819
noted. I also see that in Browser it opens with no error. But echo are muted probably i need to use console.log somehow. But in node js i get that error message.