Help with importing npm packages

Hello I’ve been trying to import sentiment package into my .jsw file. in the package documentation it uses .require() method which afaik doesnt work in wix. how else can i import and use the package?

Hi Lynn,

After testing the sentiment npm module (Installed the module by following these steps ) and its example as explained here , I was able to successfully import it and get the expected output as shown below:

The yellow indicator under require is just a warning and shouldn’t prevent the module from working.

Best regards,
Edward | Corvid Team