Failed to execute 'btoa' on 'Window'

Still have the ‘btoa’ error when running the EvaluateDefinition.

Any one any idea?


Solved by running the .gh and not the .ghx.


The problem is that “btoa” is only available in the browser.

If you run js in another environment, e.g. node.js, you can hack it by defining it globally to overcome this problem;

if (typeof btoa === 'undefined') {
  global.btoa = function (str) {
    return Buffer.from(str, 'binary').toString('base64');

The best solution is that the 3dm library does not rely on running in a browser.