https://pulumi.com logo
#general
Title
# general
l

lively-breakfast-59078

06/10/2021, 10:32 AM
Hi everyone! Having a bit of trouble with the AWS provider, attempting to provision an S3 bucket. I've got the preview failing consistently across my local env (Pulumi 3.4.0, on an M1 Macbook) and Github Actions running on
ubuntu-latest
. Has anyone else come across this?
Copy code
error: Running program '/Users/okal/workspaces/<redacted>/source/<redacted>/infra' failed with an unhandled exception:
    TypeError: Class extends value undefined is not a constructor or null
        at Object.<anonymous> (/Users/<redacted>/source/<redacted>d/infra/node_modules/@pulumi/cloudwatch/eventRuleMixins.ts:70:56)
        at Module._compile (node:internal/modules/cjs/loader:1108:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
        at Module.load (node:internal/modules/cjs/loader:988:32)
        at Function.Module._load (node:internal/modules/cjs/loader:828:14)
        at Module.require (node:internal/modules/cjs/loader:1012:19)
        at require (node:internal/modules/cjs/helpers:93:18)
        at Object.<anonymous> (/Users/<redacted>/source/<redacted>/infra/node_modules/@pulumi/cloudwatch/cloudwatchMixins.ts:16:1)
        at Module._compile (node:internal/modules/cjs/loader:1108:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
Looks like an import thing:
import {Bucket} from "@pulumi/aws/s3";
, doesn't work, but
import * as aws from "@pulumi/aws";
and subsequently using aws.s3.Bucket does.
r

red-match-15116

06/10/2021, 4:17 PM
I think
import {s3} from "@pulumi/aws"
and then
s3.Bucket
should also work. As you’ve discovered, imports appear to only work at the top level or the module level.
4 Views