https://pulumi.com
Join Slack
How is everyone using private typescript libraries for their pulumi code? I'm struggling with testin...
k

Kenji Matsuoka

over 1 year ago
How is everyone using private typescript libraries for their pulumi code? I'm struggling with testing changes. I have a single github repo with all my shared iac. Currently I have a github action that uses a tsc and yarn package to transpile the files and send them as a package to a private aws code artifact repo. This works fine, but I don't have a convenient way to test out changes. Ideally I'd like to skip the build process and just point clients temporarily to a branch of the shared iac repo in github. I can use yarn to add a github dependency on my shared iac repo, but the repo doesn't have the transpiled js files. I understand that pulumi does typescript transpilation behind the scenes, so I can just package up the .ts files, but when I try to run pulumi I get the old import error:
import * as fs from 'fs'
    ^^^^^^
    
    SyntaxError: Cannot use import statement outside a module
Is there a trick I can use to get pulumi to import .ts files (with es6 module imports) from node_modules? I've tried fiddling with various tsconfig settings, but I haven't found one that works.
k
t
j
  • 3
  • 14
  • 44
This message was deleted.
s

Slackbot

over 1 year ago
This message was deleted.
s
s
t
  • 3
  • 4
  • 44
This message was deleted.
s

Slackbot

over 2 years ago
This message was deleted.
s
t
+2
  • 4
  • 13
  • 44
This message was deleted.
s

Slackbot

over 2 years ago
This message was deleted.
s
s
+2
  • 4
  • 13
  • 44
This message was deleted.
s

Slackbot

over 2 years ago
This message was deleted.
s
m
+2
  • 4
  • 15
  • 44
This message was deleted.
s

Slackbot

almost 3 years ago
This message was deleted.
s
c
k
  • 3
  • 3
  • 44
This message was deleted.
s

Slackbot

over 3 years ago
This message was deleted.
s
j
+2
  • 4
  • 27
  • 44
This message was deleted.
s

Slackbot

over 4 years ago
This message was deleted.
s
j
s
  • 3
  • 19
  • 44
This message was deleted.
s

Slackbot

over 5 years ago
This message was deleted.
s
j
d
  • 3
  • 4
  • 44
This message was deleted.
s

Slackbot

about 6 years ago
This message was deleted.
s
n
+3
  • 5
  • 16
  • 44
Previous105106107Next

Pulumi Community

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.

Powered by