codefrau / SqueakJS

A Squeak Smalltalk VM in Javascript
https://squeak.js.org
MIT License
364 stars 75 forks source link

Error on loading squeak.js -- line 29 #129

Closed nmingotti closed 2 years ago

nmingotti commented 2 years ago

Hi,

I tried to run in my local server and I get this error in the browser:

Uncaught SyntaxError: import declarations may only appear at top level of a module squeak.js:29

bye n.

nmingotti commented 2 years ago

Solved, put this in the HTML file

<script type="module" src="SqueakJS/squeak.js"></script>
codefrau commented 2 years ago

Ah, yes. Alternatively, you can use the pre-built all-in-one file at https://github.com/codefrau/SqueakJS/tree/main/dist which does not require the module syntax.