Skip to content

how to do npm install #5

@zsszatmari

Description

@zsszatmari

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions