This message was deleted.
# general
s
This message was deleted.
w
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
CustomerAggregateSubscription
look like? Are you explicitly passing a path to
node_modules/reventless
? Or is that getting pulled in as part of a callback?
f
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.
CustomerAggregateSubscription
is just a
@pulumi/aws/sns/TopicEventSubscription
.
node_modules/reventless
is indeed a directory: actual modules should be found in
node_modules/reventless/modulexy.js
. 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
Diagnostics:
  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
LambdaConfig
to run the
@pulumi/aws/lambda/EventHandler
named
autoCommitUser
on
preSignUp
. Since the setup is functional without linking the dependency, I don't think there is problem in the logic itself. In the file
reventless/src/AWS/Cognito.bs.js
I'm only requiring
aws-sdk
,
@pulumi/aws
and
bs-platform/lib/js/caml_option.js
. In the file
reventless-examples/src/AWS/CognitoExample.bs.js
I'm just requiring
reventless/src/AWS/Cognito.bs.js
. Therefor I still don't know where
node_modules/reventless
stated in the error message comes from. A side note about the naming
*.bs.js
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
.bs.js
.