many-spring-73557
10/20/2022, 8:41 PMimport * as aws from "@pulumi/aws";
export function newRdsCpu(...) {
new aws.cloudwatch.MetricAlarm(...);
}
I am hoping to import it with something like import * as alarms from "../../pulumi-shared/alarms";
but when I do, I get Cannot find module '@pulumi/aws'
If I add a package.json
to pulumi-shared
with @pulumi/aws
in it then it works… but I don’t really want that file as an independent library. It should use the @pulumi/aws
of whatever library is calling it.
Does anyone have any suggestions for how to proceed? I am searching lots of TypeScript on how to import files from outside the root dir, but so far not having any luck.ancient-policeman-24615
10/24/2022, 4:50 PMmany-spring-73557
10/24/2022, 4:51 PM