Dependencies error on AWS OpsWorks
Closed this issue · 3 comments
I am using this cookbook and the default recipe to install NodeJS on AWS OpsWorks. But I get the following error:
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: yum-epel
Expanded Run List:
------------------
* nodejs
Platform:
---------
x86_64-linux
I am assuming you are not using yum
for package management.
The problem you describe happens because in the metadata.json
file, it has several platform-specific dependencies specified. Chef does not allow conditional dependencies. If a recipe is included (e.g. include_recipe yum_epel
or whatever) then the cookbook author needs to include it as a depends
line in the metadata. It's a limitation of Chef's metadata.
I just removed those dependencies from metadata and the run list resolves fine. (This is assuming you're not actually using yum
. If you are then you should make sure the cookbooks in the metadata dependencies are installed.)
Hi,
What do u means by removed it from meta data can u show the code from where you removed it ?
I am using Amazon linux .
Metadata
"dependencies": {
"yum-epel": ">= 0.0.0",
"build-essential": ">= 0.0.0",
"ark": ">= 0.0.0",
"apt": ">= 2.9.1",
"homebrew": ">= 0.0.0"
},
Sorry : I am newbie here and chef too.
I put nodejs::default in configure step only , all other custom recipe fields are empty
-
Still i removed it getting the same error :(
-
I commented repor.rb below line but still getting error
include_recipe 'yum-epel' -
I tired to download and add it nodejs dir but uaable to link it
Any help would be appreciated
@mattdeboard
How can i make sure that dependencies are installed ?, I can give only 1 Git and there i copied the nodejs ?
Hi All,
I have to download all the dependencies and commit it to repo after that it work , I commented yum etc but no use i have to provide all .So to make use of this ready to use script you need to download all the dependencies shown and there dependencies also.
Thanks for all help :)
This should be resolved in the latest version of the cookbook without the JSON. Feel free to open it up if you're still having the issue with that release