使用serveless-npm软件包的无服务器Sam Export错误

时间:2018-12-11 16:33:41

标签: serverless-framework aws-serverless aws-sam-cli aws-sam serverless-plugins

当我运行以下命令时:

serverless sam export --output ./sam-template.yml

我收到以下错误。我正在使用无服务器v.1.30.3和节点v10.9,我不太确定从哪里开始此错误消息,因为在线搜索没有产生任何类似的问题/修复。任何指针将不胜感激!

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

    Cannot read property 'charAt' of undefined

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

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

    TypeError: Cannot read property 'charAt' of undefined
        at StreamEventConverter.convertEvent (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/lib/events/StreamEventConverter.js:29:33)
        at Object.keys.forEach (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/lib/FunctionConverter.js:101:49)
        at Array.forEach (<anonymous>)
        at serverlessFunction.events.forEach (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/lib/FunctionConverter.js:95:33)
        at Array.forEach (<anonymous>)
        at FunctionConverter.serverlessFunctionToSam (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/lib/FunctionConverter.js:89:33)
        at allFunctions.forEach (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/lib/SamGenerator.js:119:32)
        at Array.forEach (<anonymous>)
        at SamGenerator.readFunctions (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/lib/SamGenerator.js:109:20)
        at SamGenerator.generate (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/lib/SamGenerator.js:58:10)
        at BbPromise (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/index.js:206:46)
        at SamPlugin.exportSam (/Users/marian/goop/src/github.com/goop/service-wms/node_modules/serverless-sam/index.js:203:12)
    From previous event:
        at PluginManager.invoke (/Users/marian/.nvm/versions/node/v10.9.0/lib/node_modules/serverless/lib/classes/PluginManager.js:390:22)
        at PluginManager.run (/Users/marian/.nvm/versions/node/v10.9.0/lib/node_modules/serverless/lib/classes/PluginManager.js:421:17)
        at variables.populateService.then.then (/Users/marian/.nvm/versions/node/v10.9.0/lib/node_modules/serverless/lib/Serverless.js:157:33)
        at runCallback (timers.js:693:18)
        at tryOnImmediate (timers.js:664:5)
        at processImmediate (timers.js:646:5)
        at process.topLevelDomainCallback (domain.js:121:23)
    From previous event:
        at Serverless.run (/Users/marian/.nvm/versions/node/v10.9.0/lib/node_modules/serverless/lib/Serverless.js:144:8)
        at serverless.init.then (/Users/marian/.nvm/versions/node/v10.9.0/lib/node_modules/serverless/bin/serverless:43:50)

0 个答案:

没有答案