serverless-sam icon indicating copy to clipboard operation
serverless-sam copied to clipboard

Not compatible with serverless version 3

Open awgrass opened this issue 2 years ago • 5 comments

Hi guys,

I was trying to use your plugin with serverless framework version 3. It seems that there was some breaking change that broke the plugin. The error I got was the following:

serverless sam export --output ./sam-template.yml
Running "serverless" from node_modules
Working folder: /home/alex/Git/MyProjects/serverless/food/node_modules/serverless-sam
Validate
Preparing original CloudFormation template
Environment: linux, node 12.18.2, framework 3.21.0 (local) 3.21.0v (global), plugin 6.2.2, SDK 4.3.2
Credentials: Local, "default" profile
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
TypeError: this.serverless.variables.populateService is not a function
    at SamPlugin.prepareTemplate (/home/alex/Git/MyProjects/serverless/food/node_modules/serverless-sam/index.js:154:31)
    at SamPlugin.tryCatcher (/home/alex/Git/MyProjects/serverless/food/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/alex/Git/MyProjects/serverless/food/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/alex/Git/MyProjects/serverless/food/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromiseCtx (/home/alex/Git/MyProjects/serverless/food/node_modules/bluebird/js/release/promise.js:641:10)
    at _drainQueueStep (/home/alex/Git/MyProjects/serverless/food/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/home/alex/Git/MyProjects/serverless/food/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/alex/Git/MyProjects/serverless/food/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/alex/Git/MyProjects/serverless/food/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21)
    at process.topLevelDomainCallback (domain.js:137:15)

After fiddeling a little bit around I tried to use it with the latest version of serverless 2 (2.72.3) and it seems to work there.

I checked the serverless-sam files and it seems that the serverless framework is not populating the variable "populateService" any more. As the error suggests, it does not exist.

Did I overlook something or is there simply no support for version 3 of serverless?

awgrass avatar Jul 23 '22 06:07 awgrass

same here. does not work for v3

Geaper avatar Mar 09 '23 16:03 Geaper

Yup, no worky

wwells-apixio avatar May 05 '23 17:05 wwells-apixio

Same error here

d-guedes avatar Sep 28 '23 20:09 d-guedes

+1 Don't work for "serverless": "3.38.0"

rbpimenta avatar Apr 05 '24 16:04 rbpimenta

Is there any update on this issue ?

bhalani97 avatar Apr 25 '24 09:04 bhalani97