# Packaging issue

**URL:** <https://forum.serverless.com/t/packaging-issue/9657>\
**Category:** Serverless Framework\
**Created:** [October 18, 2019, 11:40am UTC](https://forum.serverless.com/t/packaging-issue/9657 "2019-10-18T11:40:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nosuchip](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/nosuchip/32/3713_2.png) [@nosuchip](https://forum.serverless.com/u/nosuchip)\
**Post date:** [October 18, 2019, 11:40am UTC](https://forum.serverless.com/t/packaging-issue/9657/1 "2019-10-18T11:40:27Z")

</div>

I am using NodeJS 10 to create number of lambdas. Many functions has shared code that included into each function, so overall structure looks like:

```
project/
  function1/
    api.js
    serverless.yml    
  function2/
    api.js
    serverless.yml    
  function3/
    api.js
    serverless.yml    
  shared/
    http/
      index.js
      node_modules/
    intercom/
      index.js
      node_modules/      

```

Each `serverless.yml` contains function declaration like:

```
functions:
  test-database-connection:
    package:
      include:
        - ../shared/http/**
        - ../shared/intercom/**
        - ./node_modules/**
        - ./api.js
    handler: api.connectivityDatabase
    events:
      - http:
          path: /api/test/database
          method: post

```

During development it works, also working offline well, but after packaging it becomes unusable because package changes relative paths to `shared` folder like:

```
package.zip/
  shared/
    http/
      ...
    intercom/
      ...
  api.js

```

Is it possible to keep same structure in package as during development? Or any other way to fix module paths that will work locally and on AWS both?

---

<div class="post-metadata">

**Author:** ![nosuchip](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/nosuchip/32/3713_2.png) [@nosuchip](https://forum.serverless.com/u/nosuchip)\
**Post date:** [November 3, 2019, 6:54pm UTC](https://forum.serverless.com/t/packaging-issue/9657/2 "2019-11-03T18:54:35Z")

</div>

Ok, fuck it, I found solution faster by myself.
