How to remove a node module from node-red in snappy ubuntu

In node-red while starting lwm2m node is not allowing to start so, how to remove the module.
npm uninstall node-red-contrib-lwm2m.
How to remove this node module from snappy ubuntu as the above command is not working.

In the output of snap info node-red it says that that snap is published by Node RED Team, and that you can contact them directly. Have you tried that?

Yeah but they I havent got reply but if I uninstall the node-red-contrib-lwm2m node module it will start correctly

I know some of those words.

For the node-red service, you need to use the npm app from the snap as root in root’s $SNAP_USER_COMMON folder to remove it. Something like this should work:

$ sudo su - 
# cd /root/snap/node-red/current
# /snap/bin/npm remove ...

and then restart the service:

$ sudo snap restart node-red