Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

How to install jerzy.js and implement on website? #3

Open
TorbenOestergaard opened this issue Sep 26, 2016 · 1 comment
Open

How to install jerzy.js and implement on website? #3

TorbenOestergaard opened this issue Sep 26, 2016 · 1 comment

Comments

@TorbenOestergaard
Copy link

Hi there

I would love to try this library but it does not seem to work for me. First, I manually downloaded the zip-file and extracted it to a folder located in a Visual Studio Website. Next, I tried to install jerzy using the node.js command npm install jerzy. For both cases, Chrome console give the following errors (A + B):

A. Uncaught ReferenceError: require is not defined

I then googled "javascript require" and downloaded "require.js" which was probably missing? Afterwards, the console wrote:

B. Uncaught Error: Module name ".lib/vector" has not been loaded yet for context: _. Use require([])

Without succes, I then tried to change jerzy.js according to the guidelines on: requirejs.org

What am I doing wrong? In Visual Studio, I point to jerzy.js using the standard src tag:
<script src="/myWebsite/jerzy/jerzy.js"></script>

Hope you can help me out

Best regards,
Torben

@lukeasrodgers
Copy link

lukeasrodgers commented Feb 13, 2017

@TorbenOestergaard

  • using npm install will not make the library automatically available in chrome.
  • typing require ... in a browser js console will not work either, browsers don't (yet) support javascript modules like that (afaik)
  • have a look at index.html and browser.js in this repo, e.g. you can clone the repo, go to the folder and open index.html in a browser, open your console, and you should see this:
{
    "n": 150,
    "slope": 0.41575541635241114,
    "intercept": -0.3630755213190282,
    "rse": 0.20648434891360865,
    "slope_se": 0.009582435790766243,
    "slope_t": 43.387237382069216,
    "slope_p": 0,
    "intercept_se": 0.03976198987309626,
    "intercept_t": -9.131221110357261,
    "intercept_p": 2.6645352591003757e-15,
    "rs": 0.9271098389904916
}

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

No branches or pull requests

2 participants