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

Does not work in browser #49

Closed
limenleap opened this issue Nov 18, 2018 · 1 comment
Closed

Does not work in browser #49

limenleap opened this issue Nov 18, 2018 · 1 comment

Comments

@limenleap
Copy link

limenleap commented Nov 18, 2018

I was happy to read this line in the README

"Essentially, the source checkout contains everything you will need to use the library in both the browser and in node.js."

So I uploaded the entire checkout into a webserver and loaded runner.html from the test folder

Sadly, it gives these errors. I am a newbie at cryptography

runner.html:1 Refused to apply style from 'https://abcxyz.com/nacl/node_modules/mocha/mocha.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
runner.html:11 GET https://abcxyz.com/nacl/node_modules/mocha/mocha.js net::ERR_ABORTED 404
runner.html:1 Refused to execute script from 'https://abcxyz.com/nacl/node_modules/mocha/mocha.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
runner.html:12 Uncaught TypeError: mocha.setup is not a function
    at runner.html:12
(anonymous) @ runner.html:12
runner.html:39 Uncaught TypeError: Cannot read property 'emit' of undefined
    at nacl_factory.instantiate.memoryInitializerPrefixURL (runner.html:39)
    at nacl_factory.js:577
    at Object.instantiate (nacl_factory.js:581)
    at runner.html:37
@tonyg
Copy link
Owner

tonyg commented Nov 19, 2018

Run npm install . in the checkout root directory (the one with package.json) first. This will download and install the test library, mocha. Then reload the page.

@tonyg tonyg closed this as completed Nov 19, 2018
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

2 participants