This repository was archived by the owner on Jan 28, 2020. It is now read-only.
Description Here is the error message when I use application and application_nodejs cookbooks:
================================================================================
Error executing action `before_restart` on resource 'application_nodejs_nodejs[mynodejs]'
================================================================================
Chef::Exceptions::ValidationFailed
----------------------------------
Option cookbook must be a kind of [String]! You passed :mynodejs.
Cookbook Trace:
---------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_nodejs/providers/nodejs.rb:76:in `block (2 levels) in class_from_file'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_nodejs/providers/nodejs.rb:73:in `block in class_from_file'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:179:in `block in run_actions_with_context'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:176:in `each'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:176:in `run_actions_with_context'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:167:in `block (2 levels) in run_deploy'
Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
115: resource = super(resource_name.to_sym, self.name, &block)
116: break
Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:115:in `block in method_missing'
application_nodejs_nodejs("mynodejs") do
action [:nothing]
retries 0
retry_delay 2
cookbook_name :mynodejs
recipe_name "default"
template "nodejs_pm2.upstart.conf.erb"
type :nodejs
npm true
restart_command #<Proc:0x00000002923c98@/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_nodejs/providers/nodejs.rb:32>
environment {"NODE_ENV"=>"local"}
end
I got the issue fixed by went to application_nodejs/providers/nodejs.rb and edit this line:
cookbook new_resource.template ? new_resource.cookbook_name : 'application_nodejs'
to this:
cookbook new_resource.template ? new_resource.cookbook_name.to_s : 'application_nodejs'
Hope that there will be an official fix soon. Thank you :)
Reactions are currently unavailable
Here is the error message when I use
applicationandapplication_nodejscookbooks:I got the issue fixed by went to
application_nodejs/providers/nodejs.rband edit this line:to this:
Hope that there will be an official fix soon. Thank you :)