Raphael is not defined
14,979
It means that js/raphael/raphael.js
is not valid path.
Author by
Alan
Updated on June 04, 2022Comments
-
Alan almost 2 years
my html code look like this
<script src="js/raphael/raphael.js"></script> <script src="js/raphael/g.raphael.js"></script> <script src="js/raphael/g.bar.js"></script>
But my developer tool says
Uncaught ReferenceError: Raphael is not defined g.raphael.js:7
Uncaught ReferenceError: Raphael is not defined g.bar.js:19
when i load the page and look at the developer console
I have offcourse downloaded all the files and placed them in the shown locations.
What am i doing wrong?
-
Alan over 10 yearsits line 7 in g.raphael.js and line 19 in g.bar.js thats failing. How can they that if the files arent found? If i change the path in src= i geet an GET error
-
Pinal over 10 yearsg.raphael.js and g.bar.js are libraries from the same domain (raphaeljs.com) and I don't think what is the Dmitry Baranovskiy and his team error. Such errors are the results of 404 error for main file via (js/raphael/raphael.js). So check your path or load again raphael from official site
-
Alan over 10 yearsI am sure there is no error in the js files. I was just wondering if i did something wrong so they caused an error. I have tried downloading them again, the -min files this time but i get the same error. I have more than 10 other js files included and none of them fail, and they are all located in the same folder and all paths are identical. As far as i can see the first raphael.js should initialize the var raphael so the other files can use it. But that doesnt happen
-
Pinal over 10 yearsChange first raphael script src attribute to github row path - raw.github.com/DmitryBaranovskiy/raphael/master/raphael-min.js and post here are error still write?
-
Alan over 10 yearsit got an execute error so i changed it to rawgithub.com/etc and got the same error as the i described in the question. so no change
-
Pinal over 10 yearsI create jsfiddle and set raphael and all dependencies from github. All works. Can you create your fiddle or any example to show errors?
-
Alan over 10 yearsnot surprisingly it said Uncaught ReferenceError: Raphael is not defined And after all the other not defined errors. It seems my index.html somehow cant initialize raphael.js. I just dont dont know why :(
-
Alan over 10 yearshaha i tried moving the src="raphael.js" up in front of all the other not raphael related links and all errors dissapeared: Strange, but atleast i can try and use it now