# Error: this.pkg.cleanup is not a function

**URL:** <https://forum.serverless.com/t/error-this-pkg-cleanup-is-not-a-function/2222>\
**Category:** Serverless Framework\
**Tags:** openwhisk\
**Created:** [July 5, 2017, 8:06pm UTC](https://forum.serverless.com/t/error-this-pkg-cleanup-is-not-a-function/2222 "2017-07-05T20:06:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RcrsvSquid](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@RcrsvSquid](https://forum.serverless.com/u/RcrsvSquid)\
**Post date:** [July 5, 2017, 8:06pm UTC](https://forum.serverless.com/t/error-this-pkg-cleanup-is-not-a-function/2222/1 "2017-07-05T20:06:38Z")

</div>

Hello,

I am new to serverless and have been attempting to create an openwhisk service. I am able to install and deploy the template with ‘deploy -v’ however when I deploy the hello function I consistently get “this.pkg.cleanup is not a function”. Is there a fix for this issue?

---

<div class="post-metadata">

**Author:** ![RcrsvSquid](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@RcrsvSquid](https://forum.serverless.com/u/RcrsvSquid)\
**Post date:** [July 5, 2017, 8:08pm UTC](https://forum.serverless.com/t/error-this-pkg-cleanup-is-not-a-function/2222/2 "2017-07-05T20:08:53Z")

</div>

For more context the stack trace is:  
TypeError: this.pkg.cleanup is not a function  
at OpenWhiskDeployFunction.cleanup (/usr/local/lib/node\_modules/serverless-openwhisk/deployFunction/index.js:71:21)  
From previous event:  
at PluginManager.invoke (/usr/local/lib/node\_modules/serverless/lib/classes/PluginManager.js:217:22)  
at PluginManager.run (/usr/local/lib/node\_modules/serverless/lib/classes/PluginManager.js:236:17)  
at variables.populateService.then (/usr/local/lib/node\_modules/serverless/lib/Serverless.js:107:33)  
at runCallback (timers.js:800:20)  
at tryOnImmediate (timers.js:762:5)  
at processImmediate [as \_immediateCallback] (timers.js:733:5)  
From previous event:  
at Serverless.run (/usr/local/lib/node\_modules/serverless/lib/Serverless.js:94:74)  
at serverless.init.then (/usr/local/lib/node\_modules/serverless/bin/serverless:32:50)  
at
