# Include and Exclude is not working?

**URL:** <https://forum.serverless.com/t/include-and-exclude-is-not-working/93>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [August 9, 2016, 1:21pm UTC](https://forum.serverless.com/t/include-and-exclude-is-not-working/93 "2016-08-09T13:21:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![smkamranqadri](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/smkamranqadri/32/58_2.png) [@smkamranqadri](https://forum.serverless.com/u/smkamranqadri)\
**Post date:** [August 9, 2016, 1:21pm UTC](https://forum.serverless.com/t/include-and-exclude-is-not-working/93/1 "2016-08-09T13:21:21Z")

</div>

i am trying to include some files and folder from current and parent directory and also want to exclude file and folder but it’s not working, here is the snippets from serverless.yaml

package:

include:  
- …/…/lib  
- …/…/node\_modules

exclude:

- packages.json
- tsconfig.json
- src
- typings.json
- typings
- .vscode

---

<div class="post-metadata">

**Author:** ![flomotlik](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/flomotlik/32/3_2.png) [@flomotlik](https://forum.serverless.com/u/flomotlik)\
**Post date:** [August 15, 2016, 9:20am UTC](https://forum.serverless.com/t/include-and-exclude-is-not-working/93/2 "2016-08-15T09:20:26Z")

</div>

Hi,

have you tried indenting the exclude/include definitions? This might be a yml issue here.

best,  
Flo

---

<div class="post-metadata">

**Author:** ![smkamranqadri](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/smkamranqadri/32/58_2.png) [@smkamranqadri](https://forum.serverless.com/u/smkamranqadri)\
**Post date:** [August 16, 2016, 6:42am UTC](https://forum.serverless.com/t/include-and-exclude-is-not-working/93/3 "2016-08-16T06:42:38Z")

</div>

I have vscode yml validation extension which is not showing error.

---

<div class="post-metadata">

**Author:** ![zfael](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/zfael/32/150_2.png) [@zfael](https://forum.serverless.com/u/zfael)\
**Post date:** [September 20, 2016, 4:51pm UTC](https://forum.serverless.com/t/include-and-exclude-is-not-working/93/4 "2016-09-20T16:51:45Z")

</div>

Same here. Did you figured out what is going on?

---

<div class="post-metadata">

**Author:** ![smkamranqadri](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/smkamranqadri/32/58_2.png) [@smkamranqadri](https://forum.serverless.com/u/smkamranqadri)\
**Post date:** [October 6, 2016, 10:37am UTC](https://forum.serverless.com/t/include-and-exclude-is-not-working/93/5 "2016-10-06T10:37:36Z")

</div>

nope, i just created a script to pull node\_module and common code from root to current service dir.

---

<div class="post-metadata">

**Author:** ![papierschiff](https://avatars.discourse-cdn.com/v4/letter/p/839c29/32.png) [@papierschiff](https://forum.serverless.com/u/papierschiff)\
**Post date:** [November 4, 2016, 6:20pm UTC](https://forum.serverless.com/t/include-and-exclude-is-not-working/93/6 "2016-11-04T18:20:06Z")

</div>

does an include of a parent folder work now? (because i don’t get it running)
