You can tell node to use less RAM (or more RAM) for its heap by running it with this option. The number is the requested heap size in MiB.
node --max-old-space-size=750 whatever.js
1.5GiB is the default size.
If your program is using lots of RAM you may have a memory leak. That is, you may, by mistake, be keeping references to objects or arrays you no longer need. This could happen in an express application, for example, if a route handler did something (wrong) like this to keep a list of incoming requests.
saved_req.push(req)
It seems unlikely that just your package code could blow out your RAM. Many node apps use dozens of packages, because top-level ones pull in many dependencies.
All that being said, if your machine is thrashing with one node app, one browser, and one IDE, you really need more physical RAM.