Pages

Saturday, July 09, 2022

How to publish your Node app via npm

Had a strangely hard time finding good instructions on how to publish a Node project to the npm registry.

Ultimately found this blog post, which seems to have gotten me over the line.

To create an account, go to the npm signup page and fill up the form. After finishing the process, a test can be done using npm login and npm whoami. Has it output your username? Great! It is working!

A number of tutorials were missing that part as well as that you need (?) to use npm publish --access=public the first time you publish. (You can apparently use npm publish by itself afterwards.)

Here are some useful pointers on setting minimum Node version and how to version your app.