Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
magjac opened this issue Mar 19, 2017 · 5 comments

Comments

@magjac
Copy link

magjac commented Mar 19, 2017

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);
});

@mstefaniuk
Copy link
Owner

But you have no element in your body with id graph. Another story is that script with data-main is usually placed at the end of body not in head.

@magjac
Copy link
Author

magjac commented Mar 19, 2017

Thanks, with a div id="graph", the graph renders, but the error message is still present.

Regarding the script placement, it makes no difference. I got it from http://requirejs.org/docs/start.html

I see the same error message on http://graphviz.it/

@mstefaniuk
Copy link
Owner

If you are submitting such bug remember to provide steps to reproduce which in that case should cover browser kind and version as well as operating system. To keep it short - it works on my environment.

@magjac
Copy link
Author

magjac commented Mar 21, 2017

Sorry. The test above was made using:
server: lighttpd/1.4.33 on Ubuntu 14.04.5 LTS
client: Firefox 52.0.1 (32-bit) on Windows 7.

@magjac
Copy link
Author

magjac commented Mar 21, 2017

I don't see the problem with Google Chrome Version 56.0.2924.87 (64-bit) on Windows 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants