Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias plugin abouts with "Unable to retrieve template" error #86

Closed
arabold opened this issue Dec 31, 2017 · 1 comment
Closed

Alias plugin abouts with "Unable to retrieve template" error #86

arabold opened this issue Dec 31, 2017 · 1 comment

Comments

@arabold
Copy link

arabold commented Dec 31, 2017

After patching the Alias stack manually (due to issue #85) I cannot deploy anymore at all :) Now the alias plugin aborts with an error:

Error: Unable to retrieve template for my-project-dev-dev: undefined
    at _provider.request.then.catch.err (/Users/arabold/git/my-project/node_modules/serverless-aws-alias/lib/stackInformation.js:71:28)
From previous event:
    at AwsAlias.aliasStackLoadTemplate (/Users/arabold/git/my-project/node_modules/serverless-aws-alias/lib/stackInformation.js:70:9)
    at aliasStackGetAliasStackNames.mapSeries.stack (/Users/arabold/git/my-project/node_modules/serverless-aws-alias/lib/stackInformation.js:82:69)
From previous event:
    at AwsAlias.aliasStackLoadAliasTemplates (/Users/arabold/git/my-project/node_modules/serverless-aws-alias/lib/stackInformation.js:82:4)
From previous event:
    at AwsAlias.aliasStackLoadCurrentCFStackAndDependencies (/Users/arabold/git/my-project/node_modules/serverless-aws-alias/lib/stackInformation.js:147:25)
From previous event:
    at Object.before:aws:deploy:deploy:createStack [as hook] (/Users/arabold/git/my-project/node_modules/serverless-aws-alias/index.js:112:6)
    at BbPromise.reduce (/Users/arabold/git/my-project/node_modules/serverless/lib/classes/PluginManager.js:368:55)
From previous event:
    at PluginManager.invoke (/Users/arabold/git/my-project/node_modules/serverless/lib/classes/PluginManager.js:368:22)
    at PluginManager.spawn (/Users/arabold/git/my-project/node_modules/serverless/lib/classes/PluginManager.js:386:17)
    at AwsDeploy.BbPromise.bind.then (/Users/arabold/git/my-project/node_modules/serverless/lib/plugins/aws/deploy/index.js:101:48)
From previous event:
    at Object.deploy:deploy [as hook] (/Users/arabold/git/my-project/node_modules/serverless/lib/plugins/aws/deploy/index.js:97:10)
    at BbPromise.reduce (/Users/arabold/git/my-project/node_modules/serverless/lib/classes/PluginManager.js:368:55)
From previous event:
    at PluginManager.invoke (/Users/arabold/git/my-project/node_modules/serverless/lib/classes/PluginManager.js:368:22)
    at PluginManager.run (/Users/arabold/git/my-project/node_modules/serverless/lib/classes/PluginManager.js:399:17)
    at variables.populateService.then (/Users/arabold/git/my-project/node_modules/serverless/lib/Serverless.js:102:33)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)
From previous event:
    at Serverless.run (/Users/arabold/git/my-project/node_modules/serverless/lib/Serverless.js:89:74)
    at serverless.init.then (/Users/arabold/git/my-project/node_modules/serverless/bin/serverless:42:50)

I'll spend some time debugging it locally but posted this stack here for reference.

@arabold
Copy link
Author

arabold commented Dec 31, 2017

Oh, the issue is that the manually patched template now is YAML instead of JSON. That's why the parser fails with an error. Stupid me... I guess this could be some kind of a feature request but then, on the other hand, if you use sls the way it is supposed to, you should never run into this scenario in first place.

@arabold arabold closed this as completed Dec 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant