Dependency not resolving with chef-zero



I am testing my cookbook in local mode and have vendored the dependency. However when i run chef-client --local-mode it complaints of not able to find the cookbook.

This is what I did:
my recipe includes the dependency:
cat recipes/default.rb

include_recipe ‘chef-vault’
vault = chef_vault_item(‘test_assurance’, ‘hnas’)

my vendored cookbooks are under local_mode folder
on running chef-client from inside vendored folder it gives below error:

[user@user cookbooks] [user@user cookbooks] chef-client --local-mode
Starting Chef Client, version 13.8.5
resolving cookbooks for run list: [“test_assurance”]

Error Resolving Cookbooks for Run List:

Missing Cookbooks:

No such cookbook: chef-vault

Any clues ?


i would guess that it may boil down to where the dependencies are stored and where the chef-client is looking at.


Add depends 'chef-vault' into metadata.rb


issue was with chef-client finding the dependency. Providing custom client.rb with path to chef-client helped resolve the issue.