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

Error Trying to Generate SAM Template #34

Open
tfendt opened this issue Jun 4, 2019 · 1 comment
Open

Error Trying to Generate SAM Template #34

tfendt opened this issue Jun 4, 2019 · 1 comment

Comments

@tfendt
Copy link

tfendt commented Jun 4, 2019

I am getting the below error when trying to generate a SAM template and I am not having any luck finding a solution. Is this a bug with the latest serverless-sam? I can do all other serverless commands with out issue this only happens when I try to run serverless sam export.

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

Cannot use 'in' operator to search for '0' in ${file(../shared/build/slsFunctionLoader.js)}

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

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information ---------------------------
OS: win32
Node Version: 8.12.0
Serverless Version: 1.44.1

@tfendt
Copy link
Author

tfendt commented Jun 5, 2019

It looks like the plugin does not read in references to files. When I copy and paste the functions directly in the serverless file then the command succeeds.

However it also doesn't account for the variables defined outside of the serverless file.
EX: ${file(../../serverless.env.yml):${opt:stage}

It just reads through the serverless file as is and doesn't substitute anything.

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