wasdk / WebAssemblyStudio

Learn, Teach, Work and Play in the WebAssembly Studio
http://webassembly.studio
MIT License
2.91k stars 274 forks source link

AssemblyScript compiler crashes #494

Open Timmmm opened 2 years ago

Timmmm commented 2 years ago

If you just create a new AssemblyScript project and hit Build it gives this output:

[info]: Task build is running...
[error]: Task build failed: exit 1

In the dev tools console you get

Uncaught SyntaxError: Cannot use 'import.meta' outside a module

 Whoops, the AssemblyScript compiler has crashed during compile :-(
▌ 
▌ Here is the stack trace hinting at the problem, perhaps it's useful?
▌ 
▌ TypeError: Cannot read properties of undefined (reading '_BinaryenModuleCreate')
▌     at Function.create (https://cdn.jsdelivr.net/npm/assemblyscript@latest/dist/assemblyscript.js:7:467533)
▌     at new f (https://cdn.jsdelivr.net/npm/assemblyscript@latest/dist/assemblyscript.js:7:201436)
▌     at Object.t.compile (https://cdn.jsdelivr.net/npm/assemblyscript@latest/dist/assemblyscript.js:7:448529)
▌     at https://cdn.jsdelivr.net/npm/assemblyscript@latest/dist/asc.js:7:943822
▌     at D (https://cdn.jsdelivr.net/npm/assemblyscript@latest/dist/asc.js:7:949874)
▌     at e.main (https://cdn.jsdelivr.net/npm/assemblyscript@latest/dist/asc.js:7:943805)
▌     at Object.eval [as main] (eval at d (https://webassembly.studio/dist/main.bundle.js:1:32473), <anonymous>:20:12)
▌     at r.eval [as promiseMaker] (eval at gulp (https://webassembly.studio/dist/main.bundle.js:1:34093), <anonymous>:28:7)
▌     at o.makePromise (https://webassembly.studio/dist/main.bundle.js:1:31658)
▌     at s.runInstance (https://webassembly.studio/dist/main.bundle.js:1:31954)
▌ 
▌ If it refers to the dist files, try to 'npm install source-map-support' and
▌ run again, which should then show the actual code location in the sources.
▌ 
▌ If you see where the error is, feel free to send us a pull request. If not,
▌ please let us know: https://github.com/AssemblyScript/assemblyscript/issues
▌ 
▌ Thank you
MaxGraey commented 2 years ago

It will be update and fix soon. Meanwhile you can use the playground on the official website