misc/wasm: using wasm_exec.js in a NodeJs project #35729
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm currently trying to use
wasm_exec.js
in a nodejs project. The way I am importing the file into my project is by using therequire
statement i.e.const wasm_exec = require("./wasm_exec.js")
.What did you expect to see?
Nothing. This program doesn't print to standard output.
What did you see instead?
The following error
.../wasm_exec.js:85 }console.log(fetch); ^ ReferenceError: fetch is not defined
It seems like this file is choosing the wrong environment and is seeking the browser environment instead of the nodejs environment.
The text was updated successfully, but these errors were encountered: