# Do anybody try to use core modules of Node js

**URL:** <https://forums.creativeclouddeveloper.com/t/do-anybody-try-to-use-core-modules-of-node-js/443>\
**Category:** UXP Plugin API\
**Tags:** filesystem, javascript\
**Created:** [November 24, 2018, 4:16pm UTC](https://forums.creativeclouddeveloper.com/t/do-anybody-try-to-use-core-modules-of-node-js/443 "2018-11-24T16:16:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [November 28, 2018, 12:25am UTC](https://forums.creativeclouddeveloper.com/t/do-anybody-try-to-use-core-modules-of-node-js/443/3 "2018-11-28T00:25:38Z")

</div>

Hi all —

We do not directly support the use of Node-specific modules in XD plugins for many reasons, not the least of which is security (incredibly important, obviously), but also because we don’t want to ship Node as a dependency in XD. So there’s no Node whatsoever inside XD.

That said, depending on the platform, we _do_ utilize some dependencies that Node also uses. For example, on macOS, we utilize the libuv libraries which gets us the same capabilities as Node’s `fs` library. On UWP, however, the file system is heavily sandboxed, and so we have to use a different library to get access to files. As such, we abstract all this away into a provider model that enables you to interact with the file system on macOS and UWP in XD using the same exact code.

So, long story short, there are no Node libraries to expose. This is why `require('fs')` won’t get you anything useful.

Now, that’s not to say that there aren’t npm packages that won’t work within XD – there are quite a few that will work. But those that depend upon core node modules like `fs`, `path`, etc., those are apt to fail inside XD. (Never mind that XD’s `require` does _not_ resolve files like node does.)

Of course, there are features that we don’t expose because we don’t have core node modules – for example, launching child processes. There’s huge security issues here by the way, but what we want to understand is the _use cases_ behind why one would want to launch a child process (because maybe there’s a better way) – same goes for specific file system needs, etc… For those, though, we’d request a specific API feature request to be created on the forum. 🙂

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/do-anybody-try-to-use-core-modules-of-node-js/443)._
