# Unable to deploy due to "Webpack compilation error"

**URL:** <https://forum.serverless.com/t/unable-to-deploy-due-to-webpack-compilation-error/16830>\
**Category:** Serverless Framework\
**Created:** [March 2, 2022, 6:01pm UTC](https://forum.serverless.com/t/unable-to-deploy-due-to-webpack-compilation-error/16830 "2022-03-02T18:01:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamf321](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/adamf321/32/6656_2.png) [@adamf321](https://forum.serverless.com/u/adamf321)\
**Post date:** [March 2, 2022, 6:01pm UTC](https://forum.serverless.com/t/unable-to-deploy-due-to-webpack-compilation-error/16830/1 "2022-03-02T18:01:58Z")

</div>

Hi all,  
Our deploy script suddenly stopped working, so we are unable to deploy the app. We are using serverless-bundle v5.3.0 and severless v3.7.1. The error doesn’t seem to contain any useful info:

```auto
adam@NLT-A003 is % NODE_ENV=sandbox npm run deploy

> insurance-service-v2@2.0.0 deploy /Users/adam/Dev/odie/is
> npm run api-docs && cross-env sls deploy --stage $NODE_ENV

> insurance-service-v2@2.0.0 api-docs /Users/adam/Dev/odie/is
> swaggerGen -c ./swaggerConfig.json && redoc-cli bundle -o dist/public/api-docs.html dist/public/swagger.yaml

Generation completed.
Prerendering docs

🎉 bundled successfully in: dist/public/api-docs.html (1008 KiB) [⏱ 0.347s]
DOTENV: Could not find .env file.

Deploying odie-insurance-service to stage sandbox (us-east-1)
[WARNING] @aws-cdk/aws-cloudwatch.CommonMetricOptions#dimensions is deprecated.
  Use 'dimensionsMap' instead.
  This API will be removed in the next major release.
[WARNING] @aws-cdk/aws-cloudwatch.CommonMetricOptions#dimensions is deprecated.
  Use 'dimensionsMap' instead.
  This API will be removed in the next major release.
[WARNING] @aws-cdk/aws-cloudwatch.CommonMetricOptions#dimensions is deprecated.
  Use 'dimensionsMap' instead.
  This API will be removed in the next major release.
[WARNING] @aws-cdk/aws-cloudwatch.CommonMetricOptions#dimensions is deprecated.
  Use 'dimensionsMap' instead.
  This API will be removed in the next major release.
Bundling with Webpack...

✖ Stack odie-insurance-service-sandbox failed to deploy (2s)
Environment: darwin, node 14.15.4, framework 3.7.1 (local), plugin 6.1.5, SDK 4.3.2
Credentials: Local, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues

Error:
Webpack compilation errors, see stats above

2 deprecations found: run 'serverless doctor' for more details
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! insurance-service-v2@2.0.0 deploy: `npm run api-docs && cross-env sls deploy --stage $NODE_ENV`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the insurance-service-v2@2.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/adam/.npm/_logs/2022-03-02T17_55_17_225Z-debug.log

```

How can we go about debugging this?
