Cookbook merging is no longer supported

Hey,
Got the following Error but i have no clue what to do with this one any idea or someone who can guide me in the right direction? And what does cookbook merging means and how it can come to this error ?

ERROR: Chef::Exceptions::CookbookMergingError: Cookbook merging is no longer supported, the cookbook named ..... can only appear once in the cookbook_path

Cookbook merging was a feature deprecated in the early days of Chef but looks like it was just removed in Chef 15.

It means that now you can only have one copy of an individual cookbook in your cookbook path. I think the loader probably looks at the name property in metadata.rb or metadata.json to determine if it is original or not (so the cookbook could be in a differently named directory but as long as the name is the same it will throw the error).

I suggest grep or search your cookbook_path for the name mentioned in the error and rename any duplicates or move them out of the path.

1 Like