To use Nano from NPM package, you should have Node.js installed in your machine.
There are 2 options to compress SVG with this package:
Please visit https://www.npmjs.com/package/nanosvg for installation and user instructions.