Closed westn closed 3 years ago
@westn thanks for filing this issue!
In version 0.5.1, we did not support commonjs modules but forgot to update the documentation on the website to reflect that. We just published a new version (0.5.3) that now supports commonjs modules in addition to ES modules by using the exports
key in package.json
. If you update to the latest version of @tangramxyz/tangram (0.5.3) everything should work as shown in the documentation. We also added examples in languages/javascript/examples/node
in this repo demonstrating the use of both commonjs and ES modules. The example in the docs has also been updated with a small change on line 9: the .buffer
field needs to be used from the result of readFileSync
. Please incorporate that into your code. Let us know if you run into more problems.
Thank you!
@niklaszantner
Thanks! Now it's working as intended. Closing this issue.
There seems to be an error on the Node example (https://www.tangram.xyz/docs/getting_started/predict/node).
Reproduce:
Node-version 16.4.2