I'm using OpsWorks to deploy my custom node.js application. I'm not a Chef expert and thought this would be an easy process however I keep hitting snags. This most recent issue is really setting me back.
Basically I'm using a package called "Kue" which depends on a Node package called Hiredis. Hiredis is implemented at the C-level (as far as I understand) and uses some Python level compilation tools.
It seems that the default Chef script that OpsWorks uses keeps failing at the point where Kue then Hiredis is being installed. The following is the log when the instance attempts deploying the application: http://codepad.org/RXxKXqBq
Upon Googling some people are indicating its an issue with the Python version that AWS Linux is using. Note that I'm using the default Node.js application Chef recipes which can be found here: https://github.com/aws/opsworks-cookbooks/tree/release-chef-11.10/opsworks_nodejs
I'm not that familiar with node packages and version compabylity but from log that you have shared it seems it's problem in one of the node packages that you're using called amdefine:
It can be fixed by
npm cache clean
or by changing version of nodejs, as you found too probably.For adding command
npm cache clean
you must create new recipe or add it to your wrapper cookbook. Only thing that should be satisfied is that this command should be after installing node and before installing packages.If yo want to change version, you can chceck default nodejs recepie you can see that requred version of installed nodejs is definded in attributes file for that cookbook.
So you can override default value with
default[:opsworks_nodejs][:version]
attribute.