"main": "lib/cli.js",
if you wanna use it in commonJS way by impoting cssparser it will lead you to wrong entry point with no way to access
new cssparser.Parser()
class definition
in matter to fix it localy just use
require("cssparser/lib/cssparser")
in matter to fix package (in which i doubt according to version last appearance date)
package.json "main" property should be updated
from
lib/cli.js
to
lib/cssparser.js