GithubHelp home page GithubHelp logo

Comments (6)

jayair avatar jayair commented on July 29, 2024

@TrueCarry It's failing with this Error: Command failed: npm ls -prod -json -depth=1.

It seems like serverless-webpack is using something specific for npm. Not sure what is going on.

from serverless-nodejs-starter.

TrueCarry avatar TrueCarry commented on July 29, 2024

Tried with serverless-webpack 4.2.0 and it somehow works.

from serverless-nodejs-starter.

jayair avatar jayair commented on July 29, 2024

@TrueCarry Oh weird. Thanks for letting me know. I'll update it.

from serverless-nodejs-starter.

jayair avatar jayair commented on July 29, 2024

@TrueCarry Just updated it. 4cc022d. Closing this.

from serverless-nodejs-starter.

TrueCarry avatar TrueCarry commented on July 29, 2024

Hello. Tried using your template again today, and it crashes with 'probably' same error. Not sure how to debug it.

Logs:

Tims-MacBook-Pro:telegraf-aws-test TrueCarry$ SLS_DEBUG=* sls deploy
Serverless: Load command run
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command emit
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command webpack
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Invoke webpack:validate
Serverless: Invoke webpack:compile
Serverless: Bundling with Webpack...
Time: 642ms
         Asset     Size  Chunks             Chunk Names
    handler.js  4.98 kB       0  [emitted]  handler
handler.js.map  5.44 kB       0  [emitted]  handler
   [0] ./handler.js 1.91 kB {0} [built]
   [1] external "babel-runtime/regenerator" 42 bytes {0} [not cacheable]
   [2] external "babel-runtime/helpers/asyncToGenerator" 42 bytes {0} [not cacheable]
   [3] external "source-map-support/register" 42 bytes {0} [not cacheable]
   [4] external "telegraf" 42 bytes {0} [not cacheable]
   [5] external "telegraf-aws" 42 bytes {0} [not cacheable]
Serverless: Invoke webpack:package

  Syntax Error -------------------------------------------

  Unexpected end of JSON input

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

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

SyntaxError: Unexpected end of JSON input
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at BbPromise.try (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/serverless-webpack/lib/packExternalModules.js:236:47)
    at tryCatcher (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/util.js:16:23)
    at Function.Promise.attempt.Promise.try (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/method.js:39:29)
    at BbPromise.fromCallback.then.depJson (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/serverless-webpack/lib/packExternalModules.js:236:35)
    at tryCatcher (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/promise.js:638:18)
    at /Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/bluebird/js/release/nodeback.js:42:21
    at childProcess.exec (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/serverless-webpack/lib/packExternalModules.js:233:16)
    at ChildProcess.exithandler (child_process.js:282:5)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
From previous event:
    at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:368:22)
    at PluginManager.spawn (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:386:17)
    at ServerlessWebpack.BbPromise.bind.then.then.then (/Users/TrueCarry/Documents/GitHub/telegraf-aws-test/node_modules/serverless-webpack/index.js:90:51)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)

  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:           8.9.3
     Serverless Version:     1.25.0

@jayair Can you re-open this?

from serverless-nodejs-starter.

jayair avatar jayair commented on July 29, 2024

@TrueCarry Sure. Which version of Serverless are you using?

from serverless-nodejs-starter.

Related Issues (20)

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.