This message was deleted.
# general
s
This message was deleted.
s
You might try moving the import of http to inside the lambda, and use require for it. I believe there are changes in this area coming though - I raised a similar issue the other day
t
I saw this issue https://github.com/pulumi/pulumi/pull/1655 and tried to npm install “dev” which was deployed 16h ago but I still see the problem. I will try the require workaround thanks
w
cc @lemon-spoon-91807 as well. But to get things working for now, definitely try putting the
require
or
await import
on the inside.
t
ok
Copy code
endpoint.get("/test", (req, res) => {
    const http = require('http');
actually seems to do the trick! I think i tried that before but was having TS errors just because I’m not used to TS yet 😛 but now it works! thanks!
in case is useful for the devs, the specific version that I’m using atm is
Copy code
"@pulumi/pulumi": {
            "version": "0.14.3",
w
Great! We'll be doing an updated release of all of the packages soon - and with the latest code your example should work as written initially. But happy to hear you are unblocked in the meantime!
💯 1
l
Note: there was a bug that i fixed with: https://github.com/pulumi/pulumi/pull/1685 this could have caused problems
however 'http' should have been safe to import
If you run into a problem here once we rev a new release, let me know!
t
okey I will keep an eye 😉
l
Awesome!