sparse-intern-71089
05/07/2019, 9:36 AMwhite-balloon-205
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?future-morning-96441
05/10/2019, 8:07 AMCustomerAggregateSubscription
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.future-morning-96441
05/10/2019, 8:23 AMDiagnostics:
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
.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