Note that the dependencies are added on the app level, so if you add package A to one task, it is immediately available to all the other tasks in the same app.
In the task editor, you can see the "dependencies" section on the left.
Click on "Add dependency", then you can search for the NPM package you want to install. Currently, only the latest version are available for install.
Adding node libraries will increase the memory consumption of the task run. So be make sure to only add libraries that you are using.