name: test
runtime: nodejs
description: A minimal Azure NextGen TypeScript Pulumi program
main: src/index.ts
options:
# See <https://github.com/TypeStrong/ts-node/issues/1007>
nodeargs: "--loader ts-node/esm --no-warnings"
careful-book-62830
11/01/2022, 8:46 PM
If I change
main
to
dist/index.js
then I get another error from pulumi:
Copy code
Error [ERR_REQUIRE_ESM]: require() of ES Module/ dist/index.js from /node_modules/@pulumi/pulumi/cmd/run/run.js not supported.
Instead change the require of index.js in /node_modules/@pulumi/pulumi/cmd/run/run.js to a dynamic import() which is available in all CommonJS modules.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.