We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I got a problem when used viz.js to create graph. You can see the code as follow:
var deps = [ "viz.js" ];
require( deps, function() { drawGraph(); });
function drawGraph(){ var g = "digraph G { a1 -> b3; b2 -> a3; a3 -> a0; }"; var tt=Viz(g,"svg"); document.body.innerHTML += tt; }
I got the error: Uncaught Error: Module name "fs" has not been loaded yet for context: _. Use require([]) http://requirejs.org/docs/errors.html#notloaded
Then I checked the viz.js file, and I found the problem in the file:
var Ub=require("fs"),var Vb=require("path");
You can find this line in the viz.js file. I have checked on the Internet. It should be like :
require(["fs","path"], function() { var Ub=require("fs"),var Vb=require("path"); });
Is this a mistake? If not, how to solve this problem?
Thanks in advanced.
The text was updated successfully, but these errors were encountered:
fs doesn't exist in the browser, but you can make a fake version of it.
Sorry, something went wrong.
No branches or pull requests
Hi,
I got a problem when used viz.js to create graph. You can see the code as follow:
var deps = [
"viz.js"
];
require( deps, function() {
drawGraph();
});
function drawGraph(){
var g = "digraph G { a1 -> b3; b2 -> a3; a3 -> a0; }";
var tt=Viz(g,"svg");
document.body.innerHTML += tt;
}
I got the error: Uncaught Error: Module name "fs" has not been loaded yet for context: _. Use require([])
http://requirejs.org/docs/errors.html#notloaded
Then I checked the viz.js file, and I found the problem in the file:
var Ub=require("fs"),var Vb=require("path");
You can find this line in the viz.js file. I have checked on the Internet. It should be like :
require(["fs","path"], function() {
var Ub=require("fs"),var Vb=require("path");
});
Is this a mistake? If not, how to solve this problem?
Thanks in advanced.
The text was updated successfully, but these errors were encountered: