You need a package.json, and then you can do npm publish. https://npmjs.org/doc/json.html
A handy way to write the json file is to start with: npm init this will ask you some question and then generate a package.json file for you. BTW, in node.js modules are installed locally by default, so there is no need to use "sudo" with npm install. In some system to install modules globally you will need it, for instance sudo npm install -g xxxx 2012/12/16 Andy Green <[email protected]> > Is there any way to distribute node.js modules using npm? If I created a > .js file called my-custom-module.js, how could I allow other users to > install it using the command "sudo npm install my-custom-module"? > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
