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

how to do npm install #5

Open
zsszatmari opened this issue May 6, 2014 · 0 comments
Open

how to do npm install #5

zsszatmari opened this issue May 6, 2014 · 0 comments

Comments

@zsszatmari
Copy link

Dear Developers,

It's not clear to me how to 'require' a module.
For example, in Terminal.app I cd into the 'public' directory (which contains index.html), and do an

npm install hash.js

I add require('hash.js') to index.html. Then when I compile&run, I get "undefined:40: Error: No such native module hash.js."
The same with any other module.
I checked and the module is copied by Xcode to ./Contents/Resources/public/node_modules/hash.js in the .app.

Thank You for your help!

@zsszatmari zsszatmari changed the title how to do nom install how to do npm install May 6, 2014
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