question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken dependency viz.js – "Invalid asm.js: Function definition doesn't match use"

See original GitHub issue

Expected Behavior

I am trying to convert a simple smcat file to SVG:

➜ cat test.smcat
initial,
"media player off",

"media player on" {
  stopped, playing, paused;

  stopped => playing : play;
  playing => stopped : stop;
  playing => paused  : pause;
  paused  => playing : play;
  paused  => stopped : stop;
};

initial            => "media player off";
"media player off" => stopped           : power;
"media player on"  => "media player off" : power;

I expect smcat -o test.svg < test.smcat to create that SVG file.

Current Behavior

➜ smcat -o test.svg < test.smcat
(node:11096) V8: /usr/local/lib/node_modules/state-machine-cat/node_modules/viz.js/viz.js:33 Invalid asm.js: Function definition doesn't match use

Possible Solution

Seems this is related to this upstream bug in viz.js that was never fixed. Now this project is archived, and it seems there is no obvious solution to the issue. I think it cannot be used as a dependency anymore.

The same error is referenced in this issue as well. One solution is proposed: to use dagre instead.

Your Environment

  • Version used: 5.3.3
  • Node version: 12.10.0
  • Operating System and version: macOS 10.14.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sverweijcommented, Sep 30, 2019

you can instead use the native graphviz like so …

smcat -T dot -o - | dot -T svg > test.svg

(believe me when I say dagre is not an alternative … 😃 )

0reactions
sverweijcommented, Oct 8, 2019

I’ve labeled the issue so stale bot stays silent.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue 8064 in v8: Invalid asm.js - Function use doesn't match ...
Hi everyone, a warning message "Function use doesn't match definition" appears if we use a plus operator (eg. +sqrt()) on asm mode. Step...
Read more >
Invalid asm.js: Function definition doesn't match use
Invalid asm.js: Function definition doesn't match use. ... You can see the warning in console for http://viz-js.com/. I'm using Chrome 62 on ...
Read more >
Invalid asm.js: Function definition doesn't match use
Hi Folks, Trying to get debug running but I'm getting this error message in the console when I click/highlight/activate the “Callback Graph” ...
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/28 19 ...
Bug:128538 - "sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools" status:UNCONFIRMED resolution: severity:enhancement ...
Read more >
Luke Wagner's Blog | Programming, Mozilla and the Web
For existing Emscripten/asm.js users, targeting WebAssembly will be as ... dependencies (viz., the arguments to the asm.js module function) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found