# External package packed but not resolved by Lambda

**URL:** <https://forum.serverless.com/t/external-package-packed-but-not-resolved-by-lambda/3514>\
**Category:** Serverless Framework\
**Tags:** lambda\
**Created:** [January 16, 2018, 2:52am UTC](https://forum.serverless.com/t/external-package-packed-but-not-resolved-by-lambda/3514 "2018-01-16T02:52:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kriswang](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kriswang/32/1482_2.png) [@kriswang](https://forum.serverless.com/u/kriswang)\
**Post date:** [January 16, 2018, 2:52am UTC](https://forum.serverless.com/t/external-package-packed-but-not-resolved-by-lambda/3514/1 "2018-01-16T02:52:28Z")

</div>

Hi all,

I am building an API that uses a package I forked. I include it in the package.json like  
`"apn":"christwsy/node-apn"`  
and everything works fine locally with `sis invoke local -f function-name`. I deployed it on Lambda and it’s giving me `"errorMessage": "Cannot find module`.

Then I tried to see if I just deploy this function with `sls deploy -f function-name` and I can see the package is in the `.webpack/dependencies/node_modules` folders with no error, but still Lambda can’t find the module “apn”. If I change it back in package.json like `"apn":"^2.2.0"`, Lambda can find the module and run with no problem.

---

<div class="post-metadata">

**Author:** ![DavidWells](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/davidwells/32/201_2.png) [@DavidWells](https://forum.serverless.com/u/DavidWells)\
**Post date:** [January 18, 2018, 9:40pm UTC](https://forum.serverless.com/t/external-package-packed-but-not-resolved-by-lambda/3514/2 "2018-01-18T21:40:22Z")

</div>

can you share the repo and/or your serverless.yml?
