jorgebastida / gordon

λ Gordon is a tool to create, wire and deploy AWS Lambdas using CloudFormation
Other
2.05k stars 137 forks source link

Issues with nodejs6.10 #139

Open enriquecorp opened 7 years ago

enriquecorp commented 7 years ago

Hey there I'm new with gordon and I have installed the latest version but when I tried to run the samples with nodejs6.10 I always get this error: $:~/sites/gordon/examples/modulejs$ gordon build Loading project resources Loading installed applications contrib_lambdas: ✓ lambdas:version helloworld: ✓ lambdas:byejs Building project... 0001_p.json 0002_pr_r.json Traceback (most recent call last): File "/usr/local/bin/gordon", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/gordon/bin.py", line 109, in main getattr(obj, options.func)() File "/usr/local/lib/python2.7/dist-packages/gordon/core.py", line 244, in build self._build_resources_template() File "/usr/local/lib/python2.7/dist-packages/gordon/core.py", line 335, in _build_resources_template r.register_resources_template(template) File "/usr/local/lib/python2.7/dist-packages/gordon/resources/lambdas.py", line 284, in register_resources_template Runtime=self.get_runtime(), File "/usr/local/lib/python2.7/dist-packages/gordon/resources/lambdas.py", line 80, in get_runtime return self._runtimes[runtime] KeyError: 'nodejs6.10'

Why ocurrs this error, I have tried using node 6.10, node 6.10.1 and node 6.11 installed on my computer but nothing works BTW if I set the setting.yml file to nodejs4.3 everything works fine, but my requeriment is to work with nodejs6.10.0

Do I forget something more?

Thanks in advance

candlerb commented 7 years ago

When you say "the latest version" can you be more precise - exactly what version, and where you installed it from (e.g. from pip, from git)

ericblade commented 7 years ago

I just today installed gordon using "pip install gordon", and it gives KeyError: 'nodejs6.10' for any attempt to use that as the runtime.

Traceback (most recent call last):
  File "C:\Program Files\Python36\Scripts\gordon-script.py", line 11, in <module>
    load_entry_point('gordon==0.5.0', 'console_scripts', 'gordon')()
  File "c:\program files\python36\lib\site-packages\gordon\bin.py", line 109, in main
    getattr(obj, options.func)()
  File "c:\program files\python36\lib\site-packages\gordon\core.py", line 244, in build
    self._build_resources_template()
  File "c:\program files\python36\lib\site-packages\gordon\core.py", line 335, in _build_resources_template
    r.register_resources_template(template)
  File "c:\program files\python36\lib\site-packages\gordon\resources\lambdas.py", line 284, in register_resources_template
    Runtime=self.get_runtime(),
  File "c:\program files\python36\lib\site-packages\gordon\resources\lambdas.py", line 80, in get_runtime
    return self._runtimes[runtime]
KeyError: 'nodejs6.10'
ericblade commented 7 years ago

0.5 which is the last release noted here, and the version that comes up when you pip install, supports only the 0.10 (no longer supported at Amazon, if I remember correctly), and the 4.3 interpreter.

So, @enriquecorp do "pip uninstall gordon", then clone the source code from here, and in that directory, do "python setup.py develop" and that should install you the current develop version of gordon, and you can use the nodejs6.10 runtime option.

ericblade commented 7 years ago

... someone should push an update out to pip :-)

patgoley commented 5 years ago

I've also hit this issue attempting to use "nodejs8.10" runtime. I will attempt to resolve by running the setup.py script, but it's rather inconvenient and not obvious from the documentation that I would need to do that.

Thanks for a great tool! Cheers.

patgoley commented 5 years ago

Update here, the "nodejs8.10" runtime is still missing from the latest version (0.7.0), but I was able to add it myself to the gordon source code and reinstall with setup.py and it worked just fine.

I'd love to contribute this addition back to the main repo here with a PR if you'd like me to.

It would also be great if we could get these new runtime versions posted to pip so new developers don't get confused. Any chance of that happening?

ericblade commented 5 years ago

I'm not using gordon anymore (not working with AWS at the moment), but I used to have my own fork, which I submitted pull requests from, and they were eventually taken. I can't comment on pip, because I don't know anything about that :)