# \[New Feature\] Server side actions now support node modules

**URL:** <https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408>\
**Category:** New features\
**Created:** [February 1, 2019, 5:03pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408 "2019-02-01T17:03:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![marca](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/marca/32/25404_2.png) [@marca](https://forum.bubble.io/u/marca)\
**Post date:** [February 1, 2019, 5:03pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/1 "2019-02-01T17:03:03Z")

</div>

Hello everyone,

We’re adding an exciting new feature we hope will extend considerably what can be done with server side actions in the plugin editor. Server side actions are essentially javascript functions that a plugin can execute in the cloud, and historically they’ve been limited to what can be written in plain javascript without recourse to external libraries.

As of now, it is possible to incorporate whatever node modules you’d like into your server side action. To do so, check the “This action uses node modules” box beneath the action code editor, and paste in or compose your custom package.json. Only the dependencies section is needed. After this, you’ll be prompted to build a deployment package for your action.

 ![09%20PM](https://us1.discourse-cdn.com/bubble/original/3X/6/b/6bd40d53d1d472c361865e3170af9e1865c75062.png)

Let us know what you think!

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 1, 2019, 5:10pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/2 "2019-02-01T17:10:11Z")

</div>

Hey @marca: When I click/unclick the “uses node modules” checkbox, I get multiple input fields for dependencies…:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/8/a85ef4a82e91ace427e22c2cd43302a694064213.png)

---

<div class="post-metadata">

**Author:** ![marca](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/marca/32/25404_2.png) [@marca](https://forum.bubble.io/u/marca)\
**Post date:** [February 1, 2019, 5:11pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/3 "2019-02-01T17:11:38Z")

</div>

Spotted that ten minutes ago, just pushed the fix.

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 1, 2019, 5:32pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/4 "2019-02-01T17:32:17Z")

</div>

BTW, since we’re talkin’ about server-side stuff: I had this question:

> [@Invoke Issue Checker for Server-Side Action?](http://forum.bubble.io/t/invoke-issue-checker-for-server-side-action/48379):
>
> So… I finally got 'round to building my first plug-in (because, server-side). One of my Actions takes a list of any data type and a single object of any data type. HOWEVER, the list items and the single object SHOULD have the same data type. It would be nice (because we’re all ding-dongs now and then, right?) to be able to make the Issue Checker complain if these two types are dissimilar. While this particular Action won’t fail in a bad way if these inputs are of different types, I don’t see a…

---

<div class="post-metadata">

**Author:** ![andrewgassen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrewgassen/32/44248_2.png) [@andrewgassen](https://forum.bubble.io/u/andrewgassen)\
**Post date:** [February 1, 2019, 5:53pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/6 "2019-02-01T17:53:18Z")

</div>

I know this is a big deal, but can someone provide an example of something so new and incredible that’s now possible that wasn’t before?

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 1, 2019, 6:08pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/7 "2019-02-01T18:08:53Z")

</div>

… wait for it.

---

<div class="post-metadata">

**Author:** ![vini\_brito](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vini_brito/32/22187_2.png) [@vini\_brito](https://forum.bubble.io/u/vini_brito)\
**Post date:** [February 1, 2019, 6:08pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/8 "2019-02-01T18:08:57Z")

</div>

I don’t know EXACTLY what’s possible because I have not seen any actual implementations, but just think of real time communications, like **real** real time, not “real” time, controlling IoT/robotics stuff without a middleman company, create, store and/or send PDF files through email or to another app via API without user interaction… and the list goes on.

That’s what I envision. I mean, someone is making a native app generator… that’s great enough for me.

---

<div class="post-metadata">

**Author:** ![boostsalesgroup](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boostsalesgroup/32/47781_2.png) [@boostsalesgroup](https://forum.bubble.io/u/boostsalesgroup)\
**Post date:** [February 1, 2019, 7:54pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/9 "2019-02-01T19:54:26Z")

</div>

I can see you developing API PDF interactions for sure and somebody should make a native app generator

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 1, 2019, 8:03pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/10 "2019-02-01T20:03:15Z")

</div>

@marca, hmm… even code that should be working now is just throwing errors for me like:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/8/c/8c9201e664ce2e523395b6288caf0503398b9277.png)

(I’m not loading node modules yet.)

… edit: Even when creating a new plug-in and making a trivial server-side action (e.g., just return a static value), I’m getting these errors. In console they show up as:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/2/b/2b95a2e9d4c7b7cfbf0b7454b1f8ece333a18fbc.png)

---

<div class="post-metadata">

**Author:** ![marca](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/marca/32/25404_2.png) [@marca](https://forum.bubble.io/u/marca)\
**Post date:** [February 1, 2019, 8:20pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/11 "2019-02-01T20:20:10Z")

</div>

This too is fixed, as of just now.

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 1, 2019, 8:32pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/12 "2019-02-01T20:32:00Z")

</div>

I’m still seeing it… something special I have to do besides reloading editor(s)?

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [February 1, 2019, 10:16pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/13 "2019-02-01T22:16:19Z")

</div>

Sooooo Excited!!!

---

<div class="post-metadata">

**Author:** ![marca](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/marca/32/25404_2.png) [@marca](https://forum.bubble.io/u/marca)\
**Post date:** [February 1, 2019, 10:32pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/14 "2019-02-01T22:32:06Z")

</div>

Try once more, and let me know if it’s still a problem?

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 1, 2019, 10:33pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/15 "2019-02-01T22:33:10Z")

</div>

It’s working again at the moment! Thanks, @marca.

---

<div class="post-metadata">

**Author:** ![copilot](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/copilot/32/32859_2.png) [@copilot](https://forum.bubble.io/u/copilot)\
**Post date:** [February 1, 2019, 11:28pm UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/16 "2019-02-01T23:28:33Z")

</div>

Hey @andrewgassen,

Happy to provide some insight here.

For those who don’t know, Node modules are packages of functions that can be merged into your Node application for use. A simple example is that of [Moment](https://www.npmjs.com/package/moment), one of the most popular JS libraries to work with dates. There are many reasons why packages see global use, but one of them is if the work done by the few is already functional, portable, usable and most importantly useful. Instead of you investing all the time and energy in building your own set of date functions, you can simply import a package like Moment and off you go.

Despite Bubble offering access to server-side action development (which runs on Node) as well as [Request](https://www.npmjs.com/package/request) support (one of the most popular HTTP request clients), you weren’t able to import any of the 750K+ modules available therefore being a strict limitation of Bubble plugin development. With the ability to import packages now available to the community, plugin developers (like us) and those looking to [develop plugins](https://withcopilot.com/content?course=Plugin%20Development) can do much more in much less, which is what makes this a big deal for all Bubblers. 🙂

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [February 2, 2019, 12:01am UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/17 "2019-02-02T00:01:36Z")

</div>

Is there a way to use an external editor and then upload/sync with Bubble? Also, how does one go about debugging server-side action code?

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 2, 2019, 12:01am UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/18 "2019-02-02T00:01:58Z")

</div>

Right. And a bunch of my Moment-powered magic (and related utilities) is one of the first things I’m working on.

---

<div class="post-metadata">

**Author:** ![andrewgassen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrewgassen/32/44248_2.png) [@andrewgassen](https://forum.bubble.io/u/andrewgassen)\
**Post date:** [February 2, 2019, 1:15am UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/19 "2019-02-02T01:15:05Z")

</div>

I’m quite familiar with npm and the various node modules floating around, but wasn’t aware there was a limitation before with the Bubble plugin system. This makes sense to me now, and honestly is a bit surprising to me that it’s just now a new thing. I would have assumed this was part of the plugin system from the outset, but I guess I was wrong! Thanks for the clarity.

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 2, 2019, 1:32am UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/20 "2019-02-02T01:32:21Z")

</div>

The main question I have right now about server-side actions, is why are they so damn slow?

A pointless function like:

```
function(properties, context) {

obj = {
  Response: null
};

return obj;

}

```

… with an interface that accepts no arguments yields a progress bar that takes nearly 6 seconds to traverse the screen in a tester app (running on free version). And properties and context are required, so you can’t speed things up by trashing them if you don’t need 'em.

Like… really?

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [February 2, 2019, 7:36am UTC](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408/21 "2019-02-02T07:36:48Z")

</div>

I get about half that most of the time (around 2.8s), although it’s varied between 1s and 25s.

[Next page](https://forum.bubble.io/t/new-feature-server-side-actions-now-support-node-modules/48408.md?page=2)
