Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider fails due to missing dependency #2

Closed
plumdog opened this issue Nov 5, 2020 · 2 comments
Closed

Provider fails due to missing dependency #2

plumdog opened this issue Nov 5, 2020 · 2 comments

Comments

@plumdog
Copy link
Contributor

plumdog commented Nov 5, 2020

With 1.0.2, get an error like:

16:21:30 | CREATE_FAILED        | Custom::SesSmtpCredentials | Credentials/Resource/Default
Failed to create resource. Error: Cannot find module 'strftime'
Require stack:
- /var/task/index.js
- /var/runtime/UserFunction.js
- /var/runtime/index.js

Inspection of the installed files shows:

$ ls node_modules/ses-smtp-credentials-cdk/provider
index.ts  jest.config.js  lib  package.json  package-lock.json  tsconfig.json

So something has gone a bit awry in the build and publish steps, because there's no node_modules/ there, which I would expect to find.

I also tried importing like:

import { SesSmtpCredentials } from 'ses-smtp-credentials-cdk/lib';

which gets the same error, and:

$ ls node_modules/ses-smtp-credentials-cdk/lib/provider
index.js
@plumdog
Copy link
Contributor Author

plumdog commented Nov 9, 2020

Intended approach: use CDK's NodejsFunction.

@plumdog
Copy link
Contributor Author

plumdog commented Nov 9, 2020

Fixed by #4

@plumdog plumdog closed this as completed Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant