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

Following Examles and Getting Nothing but errors #576

Closed
JustinGOSSES opened this issue Aug 7, 2016 · 5 comments
Closed

Following Examles and Getting Nothing but errors #576

JustinGOSSES opened this issue Aug 7, 2016 · 5 comments

Comments

@JustinGOSSES
Copy link

JustinGOSSES commented Aug 7, 2016

I'm following the examples exactly (copied and pasted) and not able to get it to work with the current version. I've tried using CDN links for the JS and CSS alchemy files as well as using locally hosted versions of those files that were cloned from github. Both times (and using both chrome and safari), I get these two errors:

  1. SyntaxError: Unexpected token '<'
    (anonymous function) — alchemy.min.js:1
  2. ReferenceError: Can't find variable: Alchemy

I copied this example from the examples page, first example:

<html>
<head>
  <link rel="stylesheet" href="http://cdn.graphalchemist.com/alchemy.min.css"/>
</head>
<body>
  <div class="alchemy" id="alchemy"></div>

  <script src="http://cdn.graphalchemist.com/alchemy.min.js"></script>
  <script type="text/javascript">
        var config = {
            dataSource: 'data/charlize.json',
            };

        alchemy = new Alchemy(config)
    </script>
  </body>
</html>

I also copied the example data from the same page and put it in a folder called data. The html and data come form the first example found on this page: http://graphalchemist.github.io/Alchemy/#/examples

The second error looks like a side effect of the first.

@htaunay
Copy link

htaunay commented Oct 18, 2016

I got the same errors you did, and managed to fix them by using Alchemy locally instead of through the CDN. Unfortunately, even with the latest version locally I just switch form the old errors to these new ones:

ReferenceError: d3 is not defined
TypeError: c is not a function

I suspect that these examples might be broken.

@htaunay
Copy link

htaunay commented Oct 18, 2016

Ok, I managed to get some examples running by:

  • Referencing Alchemy locally instead of through its broken CDN
  • And adding to my HTML references to D3 and LoDash
  <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js"></script>

Hope it helps!

@willi-mueller
Copy link

you can also include the vendor.js in the local download which includes all dependencies.
For me the following works:

<div class="alchemy" id="alchemy"></div>
<script src="0.4.2/scripts/vendor.js"></script>
<script src="0.4.2/alchemy.js"></script>

@gudyo
Copy link

gudyo commented Jun 9, 2017

i started out with having alchemy locally and referencing all the files and still nothing. I get alchemy.begin() doesn't exist, same for alchemy.begin(conf)... there is just no such thing as begin

@taylorren
Copy link

Reference to CDN now prompts 302 and 403 error - CDN is no longer supported?

Download the latest ZIP from Github and put all files locally. Then followed @jups23 input but no output at all.

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

5 participants