# Severless Function API "Module not found : Express"

**URL:** <https://community.hubspot.com/t/severless-function-api-module-not-found-express/21907>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [June 19, 2020, 8:10pm UTC](https://community.hubspot.com/t/severless-function-api-module-not-found-express/21907 "2020-06-19T20:10:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidFJones](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/davidfjones/32/75439_2.png) [@DavidFJones](https://community.hubspot.com/u/DavidFJones)\
**Post date:** [June 19, 2020, 8:10pm UTC](https://community.hubspot.com/t/severless-function-api-module-not-found-express/21907/1 "2020-06-19T20:10:46Z")

</div>

Hey all,I’m running into an issue with express and serverless functions. When I try to make an api call with my serverless function I get the following error

`"Cannot find module 'express'`

I was pretty sure that I had installed the dependencies correctly through my package.json and package-lock.json files, but I’m still quite new to using api’s/serverless functions  
Thanks

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [June 22, 2020, 8:16am UTC](https://community.hubspot.com/t/severless-function-api-module-not-found-express/21907/2 "2020-06-22T08:16:59Z")

</div>

Hey @DavidFJones,

Could you try installing the express module like this:

```auto
 npm install express

```

and see if it works?

---

<div class="post-metadata">

**Author:** ![DavidFJones](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/davidfjones/32/75439_2.png) [@DavidFJones](https://community.hubspot.com/u/DavidFJones)\
**Post date:** [June 22, 2020, 5:14pm UTC](https://community.hubspot.com/t/severless-function-api-module-not-found-express/21907/3 "2020-06-22T17:14:25Z")

</div>

Hey @WendyGoh , so I’ve tried running that command both on my parent directory and the actually theme directory but I am still getting the same error when I attempt to run.  
For reference my current local setup is a parent folder with the yml and node\_modules folder, then I have a subdirectory that actually includes my theme and all associated files for it.

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [June 23, 2020, 7:53am UTC](https://community.hubspot.com/t/severless-function-api-module-not-found-express/21907/4 "2020-06-23T07:53:44Z")

</div>

Hey @DavidFJones,

I believe my colleague Derek has been helping you out with this case on our developer slack channel and I’d like to update this case here for other users reference:

_ **tl;dr** _

With serverless function, you do not need the `express` module. You only need to write the specific code you’d like to execute. HubSpot manages defining the endpoint, accepting requests and sending the response to the client for you.
