-
Notifications
You must be signed in to change notification settings - Fork 369
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
Error using Helmet in an AWS Lambda Nodejs 16.x #408
Comments
I ran into this problem too (not on AWS Lambda, but in "regular" Node). As you can see, I solved it by creating a separate However, I like the idea of using a |
I just made this change as part of some restructuring. Please try this out with: npm install 'https://evanhahn.com/tape/helmet-6.0.1.tgz' And let me know what you think. (If you want to see the code, check out #405.) |
@EvanHahn Thanks, the linked PR fixes this issue. Can you let me know once this is published on npm so that I can update my |
Yes, I will. |
This should be fixed in |
I got the following error while trying to run an expressjs app that uses helmet.
It seems that the lambda environment didn't quite pickup the nearest
package.json
to thedist/cjs/index.js
which should bedist/cjs/package.json
. Thispackage.json
is setting the"type": "commonjs"
so we shouldn't be seeing this error.I followed the suggestion to rename
dist/cjs.index.js
todist/cjs/index.cjs
and modifying the proper references in thepackage.json
and this worked, however not sure this is the proper fix.Should we add something to
dist/cjs/package.json
to make sure the lambda environment picks up thedist/cjs/index.js
properly?Error Log:
The text was updated successfully, but these errors were encountered: