I am working on a node application using serverless architecture. We are using serverless-webpack plugin to build the application. Here is the webpack.config.js :
When I am running sls deploy --config serverless.yml to deploy the application , everything is working and the lambda is getting deployed successfully. Only thing is , during the process of deployment , it is using the package-lock.json and installing the used packages again :
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: graphql-compose@^7.19.3, linewrap@^0.2.1, d64@^1.0.0, graphql-scalars@^1.2.6, graphql-tools@^6.0.12
Serverless: Packaging service...
My question is how to stop rerunning the npm install again during deployment instead it should use the existing node_moudles while packing the external modules. Can anybody help me on this. ?
I am working on a node application using serverless architecture. We are using serverless-webpack plugin to build the application. Here is the webpack.config.js :
and serverless.yml file. :
When I am running sls deploy --config serverless.yml to deploy the application , everything is working and the lambda is getting deployed successfully. Only thing is , during the process of deployment , it is using the package-lock.json and installing the used packages again :
My question is how to stop rerunning the npm install again during deployment instead it should use the existing node_moudles while packing the external modules. Can anybody help me on this. ?