# Cannot build or deploy with chrome-aws-lambda

**URL:** <https://discourse.sst.dev/t/cannot-build-or-deploy-with-chrome-aws-lambda/2353>\
**Category:** General\
**Created:** [March 19, 2021, 1:58pm UTC](https://discourse.sst.dev/t/cannot-build-or-deploy-with-chrome-aws-lambda/2353 "2021-03-19T13:58:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy4wardS](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/andy4wards/32/1147_2.png) [@andy4wardS](https://discourse.sst.dev/u/andy4wardS)\
**Post date:** [March 19, 2021, 1:58pm UTC](https://discourse.sst.dev/t/cannot-build-or-deploy-with-chrome-aws-lambda/2353/1 "2021-03-19T13:58:42Z")

</div>

I’ve opened this as a bug on their repo but also posting here in case someone knows how to overcome the problem.

Running locally everything works.  
Building results in the following warning:

```auto
node_modules/chrome-aws-lambda/build/index.js:188:12: warning: This call to "require" will not be bundled because the argument is not a string literal (surround with a try/catch to silence this warning)
    188 │ require(`${__dirname}/puppeteer/lib/${overload}`)

```

As it is only a warning i deployed it to see if it would work and the request to the endpoint returns an empty response almost immediately when it should take circa 10 seconds or so.

---

<div class="post-metadata">

**Author:** ![andy4wardS](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/andy4wards/32/1147_2.png) [@andy4wardS](https://discourse.sst.dev/u/andy4wardS)\
**Post date:** [March 19, 2021, 4:34pm UTC](https://discourse.sst.dev/t/cannot-build-or-deploy-with-chrome-aws-lambda/2353/2 "2021-03-19T16:34:21Z")

</div>

Managed to solve this using layers and hosting the chrome-aws-lamdba there instead of bundling with the project. Found the answer in the serverless-stack slack discussions by searching chrome-aws-lambda

Thanks
