mschuchard / linter-terraform-syntax

terraform validate linter and formatter for pulsar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Linter] Error running Terraform See Console for more info.

mpiotrak opened this issue · comments

Morning,
when added Terraform repo to my Atom I've been facing following error:
[Linter] Error running Terraform See Console for more info.
and then:
[Linter] Error running Terraform ReferenceError: toReturn is not defined
at /Users/mpiotrak/.atom/packages/linter-terraform-syntax/lib/main.js:210:11
at

Atom version 1.35.1
MacOS version 10.14.4

Any help would be very appreciated!

Regards,
Marcin

You have to View --> Developer --> Toggle Developer Tools to see the console with your specific error.

Morning @mschuchard

much appreciated your prompt response!

This was in fact error from the console:
[Linter] Error running Terraform ReferenceError: toReturn is not defined
at /Users/mpiotrak/.atom/packages/linter-terraform-syntax/lib/main.js:210:11
at

once entered for more details it takes me to following index.html file

image

So I added some code to fix #12, but it has caused a snag in this issue as a side effect. I have been aware of this because it also impacts some of my other packages (e.g. packer, vagrant, two ansible I think).

Basically you have an error but you cannot view the message because I am catching it and then checking if it is one specific error so stderr is getting gulped. Next steps for debugging would be going into the source code for the package in your local install and deleting these lines https://github.com/mschuchard/linter-terraform-syntax/blob/v1.2.6/lib/main.js#L197-L210.

After that, your specific error should hopefully display properly.

Evening @mschuchard, it did display error message:
image
gonna give it some googling later on, unless you know some quick fix on this.
Thanks for your help!

That error usually shows up when the user running Atom does not have permission to execute your Terraform binary executable. That is a common issue on Windows, but it appears you are running Linux, so I would recommend a quick check on the permissions of your Terraform executable in the path of the user running Atom.

Hi @mschuchard,

amazing support from your end. I have tackled around with permissions and executable path and it works like a charm now. Once again thank you for help!