Compile Time Error for chef-client run

Recipe Compile Error in /var/chef/cache/cookbooks/Patch12c/attributes/.default.rb.swp

If I am having a default.rb attribute and running chef-client on node then why it is looking for default.rb.swp file?

what might be the reason for this??

You are using vi (or vim) to edit your cookbook right? The swp file comes from vim and Chef can’t load/read it. Usually you should have a chefignore file (see https://github.com/chef/chef-dk/blob/master/lib/chef-dk/skeletons/code_generator/files/default/chefignore for an example) in your cookbook to ignore such temporary files,