# No file matches include / exclude patterns when attempting to structure project into sub folders

**URL:** <https://forum.serverless.com/t/no-file-matches-include-exclude-patterns-when-attempting-to-structure-project-into-sub-folders/4693>\
**Category:** Serverless Framework\
**Created:** [June 7, 2018, 12:02pm UTC](https://forum.serverless.com/t/no-file-matches-include-exclude-patterns-when-attempting-to-structure-project-into-sub-folders/4693 "2018-06-07T12:02:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rfisch](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/rfisch/32/2004_2.png) [@rfisch](https://forum.serverless.com/u/rfisch)\
**Post date:** [June 7, 2018, 12:02pm UTC](https://forum.serverless.com/t/no-file-matches-include-exclude-patterns-when-attempting-to-structure-project-into-sub-folders/4693/1 "2018-06-07T12:02:47Z")

</div>

I am attempting to organize my project in the following structure:  
root

- serverless.yml
- functions
  - function-name
    - handler.js
    - function.yml

- node\_modules  
…

I reference the functions in the main serverless.yml:  
functions:

- ${file(./functions/function-name/function.yml)}

and in the function.yml I am attempting to include only the files I will need

FunctionName:  
name: ${self:provider.stage}\_fnName  
description:  
handler: handler.doSomething  
package:  
invididually: true  
excludeDevDependencies: true  
exclude:  
- "\*\*/_"  
include:  
- handler.js  
- …/…/node\_modules/somepkg/_

but I keep getting the following error:  
Get Support --------------------------------------------  
Docs: [docs.serverless.com](http://docs.serverless.com)  
Bugs: [github.com/serverless/serverless/issues](http://github.com/serverless/serverless/issues)  
Issues: [forum.serverless.com](http://forum.serverless.com)

Your Environment Information -----------------------------  
OS: darwin  
Node Version: 8.11.2  
Serverless Version: 1.27.3

I have tried various path configurations on node\_modules but it appears as soon as I enter the include/exclude in the function, or:  
package:  
individually: true  
excludeDevDependencies: true  
exclude:  
- “\*\*/\*”

in the serverless.yml I get the error?

---

<div class="post-metadata">

**Author:** ![rfisch](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/rfisch/32/2004_2.png) [@rfisch](https://forum.serverless.com/u/rfisch)\
**Post date:** [June 7, 2018, 12:11pm UTC](https://forum.serverless.com/t/no-file-matches-include-exclude-patterns-when-attempting-to-structure-project-into-sub-folders/4693/2 "2018-06-07T12:11:33Z")

</div>

I appears that anytime I reference:  
exclude

- ‘\*/\*\*’  
or  
remove devDependencies I get this error.

If I don’t exclude it packages fine but I get everything in the project which is not desired.
