Skip to content

TypeError: asm.js type error: 'byteLength' is not a standard constant or typed array name layout-worker.js:3211:60 #29

@magjac

Description

@magjac

Sorry to trouble you with newbie questions all the time. Really appreciate your help.

I get the above error message when testing this:

magjac-testing-graphviz-d3-renderer.html:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <script src="bower_components/requirejs/require.js" data-main="main.js"></script>
  </head>
  <body>
    <h1>magjac testing graphviz-d3-renderer</h1>
  </body>
</html>

main.js:

requirejs.config({
    //By default load any module IDs from js/lib
    baseUrl: 'js',
    //except, if the module ID starts with "app",
    //load it from the js/app directory. paths
    //config is relative to the baseUrl, and
    //never includes a ".js" extension since
    //the paths config could be for a directory.
    paths: {
        d3: '/bower_components/d3/d3',
        "dot-checker": '/bower_components/graphviz-d3-renderer/dist/dot-checker',
        "layout-worker": '/bower_components/graphviz-d3-renderer/dist/layout-worker',
        worker: '/bower_components/requirejs-web-workers/src/worker',
        renderer: '/bower_components/graphviz-d3-renderer/dist/renderer',
    }
});

require(["renderer"],
  function (renderer) {

  dotSource = 'digraph xyz { a -> b }';
  // initialize svg stage
  renderer.init("#graph");

  // update stage with new dot source
  renderer.render(dotSource);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions