Giter Site home page Giter Site logo

serverless-enable-api-logs's People

Contributors

dcoy avatar luanmuniz avatar paulsambolin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

serverless-enable-api-logs's Issues

Type Error: Cannot read property 'stage' of undefined.

I'm getting this error:

  Type Error ---------------------------------------------

     Cannot read property 'stage' of undefined

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Stack Trace --------------------------------------------

TypeError: Cannot read property 'stage' of undefined
    at Class.module.exports.Class.extend.addStageVariables (/apps/lab-template-serverless/node_modules/serverless-enable-api-logs/src/index.js:33:50)
    at /.nodenv/versions/4.3.2/lib/node_modules/serverless/lib/classes/PluginManager.js:160:50
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at PluginManager.run (/.nodenv/versions/4.3.2/lib/node_modules/serverless/lib/classes/PluginManager.js:160:22)
    at Serverless.run (/.nodenv/versions/4.3.2/lib/node_modules/serverless/lib/Serverless.js:95:31)
    at /.nodenv/versions/4.3.2/lib/node_modules/serverless/bin/serverless:23:50

which corresponds to this line in the code:

var stage = this._serverless.service.defaults.stage;

I'm using the latest version of serverless.

Deployment with existing stack causes error

Thanks for the plugin. I am getting this error when your plugin to my serverless project file:

$ sls deploy
Serverless: Installing required Python packages...
Serverless: Linking required Python packages...
Serverless: Packaging service...
Serverless: Unlinking required Python packages...
Serverless: Deploying additional stacks...
Serverless: Additional stack permanent has not changed.
Serverless: Enabled logging for ApiGateway Stage
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading service .zip file to S3 (17.21 MB)...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..............................................................................................................................................Serverless: Deployment failed!

  Serverless Error ---------------------------------------

     An error occurred while provisioning your stack: ApiGatewayStage
     - foo already exists.

  Stack Trace --------------------------------------------

ServerlessError: An error occurred while provisioning your stack: ApiGatewayStage - foo already exists.
    at provider.request.then (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:112:33)
From previous event:
    at AwsDeploy.monitorStack (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:29:12)
    at provider.request.then (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:90:30)
From previous event:
    at AwsDeploy.update (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:90:8)
From previous event:
    at AwsDeploy.BbPromise.bind.then.then (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:111:12)
From previous event:
    at AwsDeploy.updateStack (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:103:8)
From previous event:
    at Object.deploy:deploy [as fn] (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/deploy/index.js:55:10)
    at BbPromise.reduce (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/classes/PluginManager.js:210:55)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)
From previous event:
    at PluginManager.invoke (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/classes/PluginManager.js:210:22)
    at PluginManager.run (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/classes/PluginManager.js:225:17)
    at Serverless.run (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/Serverless.js:97:31)
    at serverless.init.then (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/bin/serverless:23:50)

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                 darwin
     Node Version:       6.10.1
     Serverless Version: 1.10.1

et me know if you additional details?

Added to existing repo, causes stageName already exists

 Serverless Error ---------------------------------------

     An error occurred while provisioning your stack: ApiGatewayStage
     - myStageName already exists.

  Stack Trace --------------------------------------------

Not sure if there is anyway to get around this....

I just did sls remove, and then sls deploy and it resolved it. But you can't just do that everytime.

Module using outdated lodash

Overview

When I run npm audit in a project that is using the latest version of this module, it is reporting that the lodash version of it is outdate. Could somebody take a look on it?

Vulnerabilities found

Module Path Recommended Version Overview Issue
lodash serverless-enable-api-logs > lodash >=4.17.5 Prototype Pollution https://nodesecurity.io/advisories/577
lodash serverless-enable-api-logs > lodash >=4.17.11 Prototype Pollution https://nodesecurity.io/advisories/782
lodash serverless-enable-api-logs > lodash >=4.17.12 Prototype Pollution https://nodesecurity.io/advisories/1065

Version

^2.0.0

Date

Aug 5th, 2019

Evidences

image
image
image

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.