# Node module with compiled binary isn't working

**URL:** <https://forum.serverless.com/t/node-module-with-compiled-binary-isnt-working/3234>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [December 3, 2017, 2:16am UTC](https://forum.serverless.com/t/node-module-with-compiled-binary-isnt-working/3234 "2017-12-03T02:16:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisGrigg](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/chrisgrigg/32/1361_2.png) [@ChrisGrigg](https://forum.serverless.com/u/ChrisGrigg)\
**Post date:** [December 3, 2017, 2:16am UTC](https://forum.serverless.com/t/node-module-with-compiled-binary-isnt-working/3234/1 "2017-12-03T02:16:27Z")

</div>

Hi,

I’m trying to run a node module on aws.

I’m using a node module called “hummus” which contains 'hummus.node" a compiled C++ library.

As soon as I require(“hummus”) it will break with following. Any suggestion on what I’m doing wrong?

module initialization error: Error  
at Object.exports.find (/var/task/pdf\_watcher/index.js:142672:15)  
at Object. (/var/task/pdf\_watcher/index.js:140663:27)  
at Object.459…/PDFRStreamForFile (/var/task/pdf\_watcher/index.js:140689:4)  
at s (/var/task/pdf\_watcher/index.js:1:682)  
at /var/task/pdf\_watcher/index.js:1:733  
at Object.518…/lib/fileHelper (/var/task/pdf\_watcher/index.js:148752:16)  
at s (/var/task/pdf\_watcher/index.js:1:682)  
at e (/var/task/pdf\_watcher/index.js:1:853)  
at /var/task/pdf\_watcher/index.js:1:871  
at a (/var/task/pdf\_watcher/index.js:1:150)  
at Object. (/var/task/pdf\_watcher/index.js:1:384)  
at Module.\_compile (module.js:570:32)  
at Object.Module.\_extensions…js (module.js:579:10)  
at Module.load (module.js:487:32)  
at tryModuleLoad (module.js:446:12)  
at Function.Module.\_load (module.js:438:3)

---

<div class="post-metadata">

**Author:** ![rowanu](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/rowanu/32/75_2.png) [@rowanu](https://forum.serverless.com/u/rowanu)\
**Post date:** [December 4, 2017, 12:12am UTC](https://forum.serverless.com/t/node-module-with-compiled-binary-isnt-working/3234/2 "2017-12-04T00:12:46Z")

</div>

You binary will need to be compiled to work on the AWS Linux-based container that Lambda runs in.

If you’ve got Docker, you could compile you package inside [https://github.com/lambci/docker-lambda](https://github.com/lambci/docker-lambda) and it should run in Lambda.

---

<div class="post-metadata">

**Author:** ![ChrisGrigg](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/chrisgrigg/32/1361_2.png) [@ChrisGrigg](https://forum.serverless.com/u/ChrisGrigg)\
**Post date:** [December 4, 2017, 5:22am UTC](https://forum.serverless.com/t/node-module-with-compiled-binary-isnt-working/3234/3 "2017-12-04T05:22:42Z")

</div>

Thanks @rowanu that Docker lambda helped me debug and build.
