Hi, I'm working on a proof of concept to use Pulum...
# general
Hi, I'm working on a proof of concept to use Pulumi in our project (AWS, Event Sourced). I'm getting an error on
pulumi up
, but I don't really know where to go from there:
Copy code
run pulumi up -s dev
Previewing update (dev):

    pulumi:pulumi:Stack reventless-examples-dev running 
    reventless:CommandTopic CustomerCommandTopic  
    aws:sqs:Queue CustomerCommandTopicQueue  
    aws:sns:Topic CustomerCommandTopicTopic  
    pulumi:pulumi:Stack reventless-examples-dev  (node:5748) ExperimentalWarning: queueMicrotask() is experimental.
    aws:sqs:QueueEventSubscription CustomerAggregateSubscription  
    aws:sns:TopicSubscription CustomerCommandTopicSubscription  
    aws:iam:Role CustomerAggregateSubscription  
    aws:iam:RolePolicyAttachment CustomerAggregateSubscription-7cd09230  
    aws:iam:RolePolicyAttachment CustomerAggregateSubscription-32be53a2  
    pulumi:pulumi:Stack reventless-examples-dev  Error: failed to register new resource CustomerAggregateSubscription [aws:lambda/function:Function]: 2 UNKNOWN: failed to compute asset hash: asset path 'node_modules/reventless' is a directory; try using an archive
    pulumi:pulumi:Stack reventless-examples-dev      at Object.registerResource (/home/chris/Projects/reventless-examples/node_modules/reventless/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/runtime/resource.js:114:27)
The setup is as following: The first project (called "reventless") contains some `componentResource`s (pure javascript) and is versioned in a private git repository. Reventless is required by the second project, stated in
(private repo with access token). This seems to work. Troubles arise, when I use
npm link
to develop both projects together. Is there some known issue regarding linked node modules?
I would not have expected
npm link
to cause problems here. We use
yarn link
heavily for testing within Pulumi. What does the code for your
look like? Are you explicitly passing a path to
? Or is that getting pulled in as part of a callback?
Thanks for your reply Luke. I'm sorry, I got hold up on another task and just started to work on the mentioned issue again.
is just a
is indeed a directory: actual modules should be found in
. I don't really know, where this directory comes from. The moment I remove the link and just depend on it, it works.
Right now I'm facing the same issue-pattern on another component:
Copy code
  pulumi:pulumi:Stack (reventless-examples-dev):
    (node:13675) ExperimentalWarning: queueMicrotask() is experimental.
    Error: failed to register new resource autoCommitUser [aws:lambda/function:Function]: 2 UNKNOWN: failed to compute asset hash: asset path 'node_modules/reventless' is a directory; try using an archive
        at Object.registerResource (/home/chris/Projects/reventless/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/runtime/resource.js:114:27)
        at new Resource (/home/chris/Projects/reventless/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/resource.js:96:24)
        at new CustomResource (/home/chris/Projects/reventless/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/resource.js:145:9)
        at new Function (/home/chris/Projects/reventless/node_modules/@pulumi/lambda/function.ts:315:9)
        at new CallbackFunction (/home/chris/Projects/reventless/node_modules/@pulumi/lambda/lambdaMixins.ts:321:9)
        at Array.makeAutoCommiting (/home/chris/Projects/reventless/src/AWS/Cognito.bs.js:25:23)
        at Object.<anonymous> (/home/chris/Projects/reventless-examples/src/AWS/CognitoExample.bs.js:6:69)
        at Module._compile (internal/modules/cjs/loader.js:816:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
        at Module.load (internal/modules/cjs/loader.js:685:32)
In this case I'm trying to deploy an
AWS Cognito UserPool
with a
to run the
. Since the setup is functional without linking the dependency, I don't think there is problem in the logic itself. In the file
I'm only requiring
. In the file
I'm just requiring
. Therefor I still don't know where
stated in the error message comes from. A side note about the naming
and the module `bs-platform/lib/js/caml_option.js`: I'm writing the application completely in [Reason](https://reasonml.github.io), which transpiles to javascript. The resulting files are suffixed with