# SNAP run npm command

**URL:** <https://discourse.nodered.org/t/snap-run-npm-command/5558>\
**Category:** General\
**Created:** [7 December 2018 08:42 UTC](https://discourse.nodered.org/t/snap-run-npm-command/5558 "2018-12-07T08:42:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdresf](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mdresf](https://discourse.nodered.org/u/mdresf)\
**Post date:** [7 December 2018 08:42 UTC](https://discourse.nodered.org/t/snap-run-npm-command/5558/1 "2018-12-07T08:42:22Z")

</div>

Hello,  
I installed node-red as a **snap** on ubuntu-core. It's an easy process and everything is working nicely except that I am not able to run npm command to manually install node.

For example automatic installation from browser of **node-red-contrib-modbus** is failing so I would like to use the recommended command :  
npm install node-red-contrib-modbus --unsafe-perm --build-from-source

or if want to use" npm install" to automatically install all the node listed in packages.json.

This is more a problem related to snap than to node-red but if any of you have an idea...

Thanks

Martin

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 December 2018 13:15 UTC](https://discourse.nodered.org/t/snap-run-npm-command/5558/2 "2018-12-07T13:15:04Z")

</div>

The strict containerisation of snap means that although node and npm are installed inside the snap they aren't available outside... Also all the extra build tools to compile a node with binary options do not remain inside....

So the best way round is to build your own snap based off the master - [https://github.com/dceejay/nodered.snap](https://github.com/dceejay/nodered.snap)

and edit the snapcraft.yaml file to add the extra nodes you want at build time - so it is packaged how you want it.

---

<div class="post-metadata">

**Author:** ![mdresf](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mdresf](https://discourse.nodered.org/u/mdresf)\
**Post date:** [7 December 2018 15:22 UTC](https://discourse.nodered.org/t/snap-run-npm-command/5558/3 "2018-12-07T15:22:36Z")

</div>

Thank you for the answer, if build my own snap it will no more update node-red automatically?
