GithubHelp home page GithubHelp logo

Comments (4)

ammulder avatar ammulder commented on June 26, 2024 1

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.

ammulder avatar ammulder commented on June 26, 2024

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.

stevejhiggs avatar stevejhiggs commented on June 26, 2024

nice catch! I suspect some internal upgrades have broken the upload process. Give me a sec

from aws-lambda-typescript.

stevejhiggs avatar stevejhiggs commented on June 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.