godotjs / javascript

Javascript binding for godotengine
https://godotjs.github.io/
MIT License
963 stars 84 forks source link

Can't import a library that doesn't have a class definition #120

Closed xxmatxx closed 5 days ago

xxmatxx commented 2 years ago

I can't import a library that doesn't have a class definition. All import ends with:

ERROR: get_instance_base_type: Parameter "ecma_class" is null.
   At: modules/ECMAScript/ecmascript.cpp:29

Library i tried: https://csv.js.org/ https://www.papaparse.com/

nmerget commented 11 months ago

Here is a working example.

I use TS here and compile all npm_modules I use to a script which will be built by esbuild. Besides this, you could use https://unpkg.com/papaparse@5.4.1/papaparse.min.js which should be the same like the esbuild file.

nmerget commented 5 days ago

Added this question to gotchas