Hello, I am trying to use Automation in an AWS Lam...
# automation-api
c
Hello, I am trying to use Automation in an AWS Lambda. I got this error, any idea of the root cause ?
Copy code
{
  "errorType": "ReferenceError",
  "errorMessage": "window is not defined",
  "trace": [
    "ReferenceError: window is not defined",
    "    at /var/task/index.js:270836:22",
    "    at ../../node_modules/.pnpm/@pulumi+pulumi@3.116.0/node_modules/@pulumi/pulumi/proto/status_pb.js (/var/task/index.js:270837:7)",
    "    at __require (/var/task/index.js:12:51)",
    "    at ../../node_modules/.pnpm/@pulumi+pulumi@3.116.0/node_modules/@pulumi/pulumi/provider/server.js (/var/task/index.js:271029:37)",
    "    at __require (/var/task/index.js:12:51)",
    "    at ../../node_modules/.pnpm/@pulumi+pulumi@3.116.0/node_modules/@pulumi/pulumi/provider/index.js (/var/task/index.js:271555:15)",
    "    at __require (/var/task/index.js:12:51)",
    "    at ../../node_modules/.pnpm/@pulumi+pulumi@3.116.0/node_modules/@pulumi/pulumi/index.js (/var/task/index.js:337929:34)",
    "    at __require (/var/task/index.js:12:51)",
    "    at ../../node_modules/.pnpm/@pulumi+aws@6.34.1/node_modules/@pulumi/aws/index.js (/var/task/index.js:467052:18)"
  ]
}
w
Looks like you are using some browser API
The answer is on line 270836 of /var/task/index.js
Check your dependencies and make sure you aren’t using something that is for the browser only
c
will check, thanks @worried-queen-62794