Comments (4)
Seems like it is solved by adding libraryTarget: "commonjs2" in the Webpack config in gulp-webpack-typescript-pipeline:
output: {
path: path.join(options.outputDir),
libraryTarget: "commonjs2",
filename: '[name].js'
},
Is there some way to provide that setting as an override from this module?
from aws-lambda-typescript.
I also tried using "gulp lambda:deploy" to deploy to a new Lambda function, instead of my existing one, and I get the same error:
{
"errorMessage": "Handler 'default' missing on module 'index'"
}
As far as I can tell, when Webpack processes the code, it breaks the "export" statement? It's not clear to me what the actual exports in the processed "index.js" are versus what AWS Lambda is looking for.
Finally, for grins, I started a new project, followed the instructions in the README without editing the index.ts at all, put my account settings and a function name into lambda-config.js, and ran "gulp lambda:deploy". So this seems as vanilla as it gets. I get the same error as above.
It seems like I have Webpack 2.6.1 and uglifyJS 2.8.29. If any other info would be helpful, let me know.
from aws-lambda-typescript.
nice catch! I suspect some internal upgrades have broken the upload process. Give me a sec
from aws-lambda-typescript.
ok, please update to 0.0.11 and this should all be fixed. You dont need to regenerate the function it is enough just to regenerate the package. Thanks again for the help
from aws-lambda-typescript.
Related Issues (17)
- Debugging with VSCode HOT 6
- aws-sdk calls don't work HOT 5
- Lambda Environment Variables Broken HOT 3
- DynamoDB Document API in TypeScript HOT 1
- Lambda handler function name is mangled by Webpack+UglifyJS when doing a release build HOT 3
- MySQL doesn't work HOT 3
- gulp lambda:run / package runtime error HOT 4
- Please update dependencies HOT 1
- gulp lambda:init doesn't work HOT 2
- Cannot find module HOT 1
- Compile failure causes bad deployment HOT 1
- Doesn't work with Gulp 4 HOT 2
- How to disable ignorable TS errors for a line? HOT 2
- Copy .npmrc during deploy HOT 3
- Lambda deploy generates errors now HOT 4
- 'gulp lambda:init' fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-typescript.