# Node\_modules dependencies

**URL:** <https://forum.serverless.com/t/node-modules-dependencies/4941>\
**Category:** Serverless Framework\
**Created:** [July 2, 2018, 4:29pm UTC](https://forum.serverless.com/t/node-modules-dependencies/4941 "2018-07-02T16:29:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![majdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/majdi/32/2164_2.png) [@majdi](https://forum.serverless.com/u/majdi)\
**Post date:** [July 2, 2018, 4:29pm UTC](https://forum.serverless.com/t/node-modules-dependencies/4941/1 "2018-07-02T16:29:48Z")

</div>

Hello,

I’m using serverless framework for the first time;  
I have a nice bootstrap function using graphql but on deploy some packages are missing [like graphql or graphql-yoga for example]

There are all on dependencies and not dev and I’m a little confuse about that ☹  
I’m using serverless-webpack with the custom configuration but I have an error: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

Package.json:  
“dependencies”: {  
“graphql”: “^0.13.2”,  
“graphql-config”: “^2.0.1”,  
“graphql-import”: “^0.6.0”,  
“graphql-playground-middleware-lambda”: “^1.7.1”,  
“graphql-tag”: “^2.9.2”,  
“graphql-tools”: “^3.0.4”,  
“graphql-yoga”: “^1.14.10”,  
“prisma-binding”: “^2.1.0”  
}

Logs:  
{  
“errorMessage”: “Cannot find module ‘prisma-binding’”,  
“errorType”: “Error”,  
“stackTrace”: [  
…  
]  
}

Thank youuu 🙂

---

<div class="post-metadata">

**Author:** ![buggy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/buggy/32/177_2.png) [@buggy](https://forum.serverless.com/u/buggy)\
**Post date:** [July 3, 2018, 11:44am UTC](https://forum.serverless.com/t/node-modules-dependencies/4941/2 "2018-07-03T11:44:35Z")

</div>

By default webpack will use tree shaking to remove dead code. Unfortunately it can get this wrong sometimes. I’ve had success using the [webpack-node-externals](https://www.npmjs.com/package/webpack-node-externals) plugin to make sure it packages all of your dependencies externally.

---

<div class="post-metadata">

**Author:** ![majdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/majdi/32/2164_2.png) [@majdi](https://forum.serverless.com/u/majdi)\
**Post date:** [July 3, 2018, 2:54pm UTC](https://forum.serverless.com/t/node-modules-dependencies/4941/3 "2018-07-03T14:54:27Z")

</div>

Thanks for the reply, actually I removed and re-create my app and all package are loaded… weird but it works now
