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

Unexpected String when requiring #15

Open
dylanh724 opened this issue Jul 11, 2016 · 0 comments
Open

Unexpected String when requiring #15

dylanh724 opened this issue Jul 11, 2016 · 0 comments

Comments

@dylanh724
Copy link

dylanh724 commented Jul 11, 2016

package.json
"cryptojs": "^2.5.3",

$ node server.js

/home/dylan/tol-node/tol/server.js:9
var Crypto = (require 'cryptojs').Crypto // Same as the readme?
                      ^^^^^^^^^^
SyntaxError: Unexpected string

Almost seems like I didn't install it, but it's there. I tried npm install just in case dependencies got lost, but all seems well. Running on Ubuntu. Any thoughts?

PS -- Although it failed at the init, I'm trying to do this:

var hash = Crypto.enc.Base64.stringify( Crypto.HmacSHA256(nonce, secret) );

This is how I did it with cryptojs in non-node .. I can do the same, right?

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

1 participant