https://pulumi.com logo
Title
f

full-dress-10026

05/20/2021, 4:54 PM
I am using a
aws.lambda.CallbackFunction
and just added tslog to my package json. Upon adding it and calling log.info in my code, I get the following error during the pulumi preview.
function 'callback': batchScalingManager.ts(190,31): referenced
      function 'handleBatch': batchScalingManager.ts(25,20): which captured
        variable 'log' which indirectly referenced
          function 'wrapCallSite': source-map-support.js(348,21): which referenced
            function 'isInBrowser': source-map-support.js(50,20): which could not be serialized because
              Unexpected missing variable in closure environment: window
    
    Function code:
      function isInBrowser() {
        if (environment === "browser")
          return true;
        if (environment === "node")
          return false;
      ...
Is this something that could be fixed from my end or no dice with this lib?
b

billowy-army-68599

05/20/2021, 4:58 PM
what are you doing
<http://log.info|log.info>
on?
f

full-dress-10026

05/20/2021, 5:03 PM
import * as tslog from "tslog"

const log = new tslog.Logger()
<http://log.info|log.info>("jhe")
b

billowy-army-68599

05/20/2021, 5:05 PM
i can't see any reason that wouldn't work, can yoi open an issue in
pulumi/pulumi
👌 1