{"record":{"id":"3ca1b554715c3052","repo":"hashicorp/vagrant","slug":"the-box-name-could-not-be-found-or-could-not","errorCode":null,"errorMessage":"The box '%{name}' could not be found or could not be accessed in the remote catalog. \nIf this is a private box on the HashiCorp Vagrant Public Registry, please verify \nyou're logged in via `vagrant cloud auth login`. Also, please double-check the name. \nThe expanded URL and error message are shown below:\n\nURL: %{url}\nError: %{error}","messagePattern":"The box '%(.+?)' could not be found or could not be accessed in the remote catalog\\. \nIf this is a private box on the HashiCorp Vagrant Public Registry, please verify \nyou're logged in via `vagrant cloud auth login`\\. Also, please double-check the name\\. \nThe expanded URL and error message are shown below:\n\nURL: %(.+?)\nError: %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::BoxAddShortNotFound","httpStatus":null,"severity":"warning","filePath":"lib/vagrant/action/builtin/box_add.rb","lineNumber":135,"sourceCode":"          if single_entry && expanded\n            idx = is_metadata_results.index { |v| v === true }\n            # If none of the urls were successful, set the index\n            # as the last entry\n            idx = is_metadata_results.size - 1 if idx.nil?\n\n            # Now reset collections with single value\n            is_metadata_results = [is_metadata_results[idx]]\n            authed_urls = [authed_urls[idx]]\n            url = [url[idx]]\n          end\n\n          if expanded && url.length == 1\n            is_error = is_metadata_results.find do |b|\n              b.is_a?(Errors::DownloaderError)\n            end\n\n            if is_error\n              raise Errors::BoxAddShortNotFound,\n                error: is_error.extra_data[:message],\n                name: env[:box_url],\n                url: url\n            end\n          end\n\n          is_error = is_metadata_results.find do |b|\n            b.is_a?(Errors::DownloaderError)\n          end\n          if is_error\n            raise Errors::BoxMetadataDownloadError,  \n              message: is_error.extra_data[:message]\n          end\n\n          is_metadata = is_metadata_results.any? { |b| b === true }\n          if is_metadata && url.length > 1\n            raise Errors::BoxAddMetadataMultiURL,\n              urls: url.join(\", \")","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/action/builtin/box_add.rb#L117-L153","documentation":"Emitted from expanded_folders (chef_solo.rb:73-98) during configure: chef_solo expands every host-side path relative to the project root with File.expand_path, and when File.exist? is false it warns e.g. \"The cookbook path '%{path}' doesn't exist. Ignoring...\" and skips that folder with `next`. The appended_folder argument selects the message key: configure passes \"cookbooks\", \"roles\", \"data_bags\", \"environments\", \"nodes\" for the corresponding *_path options (chef_solo.rb:37-41). The chef-solo run continues without the missing folder — a missing cookbooks folder typically makes the actual chef-solo execution fail later when it cannot load recipes.","triggerScenarios":"chef_solo (or chef_zero, which shares this provisioner code path via its solo-style folders) with cookbooks_path/roles_path/data_bags_path/environments_path/nodes_path whose :host entry does not exist on the host: typo, directory never created, wrong letter casing on a case-sensitive filesystem, absolute path from another machine, or running vagrant from a different root_path than where the paths resolve.","commonSituations":"Forgot to clone/vendor cookbooks (berks vendor, knife cookbook site install) before `vagrant up`; path typo like \"cookboks\"; directory renamed; repo checked out on Linux with \"Cookbooks\" vs \"cookbooks\" casing mismatch; Windows-style absolute path (C:\\...) used on a macOS/Linux host.","solutions":["Create the missing directory the warning prints — the %{path} in the message is the fully expanded path, so compare it directly with what exists.","Fix the Vagrantfile path: paths are expanded relative to the Vagrantfile's root_path, so prefer repo-relative values like \"cookbooks\".","If cookbooks come from Berkshelf, run `berks vendor cookbooks` (or use the berkshelf client plugin) before provisioning.","Verify quickly: `ls -d \"$(vagrant ssh-config >/dev/null; echo)\"` — or simply `File.exist?(File.expand_path(path, project_root))` from Ruby before invoking vagrant."],"exampleFix":"# Vagrantfile — before (typo: cookboks)\nconfig.vm.provision \"chef_solo\" do |chef|\n  chef.cookbooks_path = \"cookboks\"\n  chef.run_list       = [\"recipe[motd]\"]\nend\n\n# after\nroot = File.dirname(__FILE__)\nconfig.vm.provision \"chef_solo\" do |chef|\n  chef.cookbooks_path = \"cookbooks\"\n  abort \"cookbooks missing: #{File.expand_path(chef.cookbooks_path, root)}\" unless File.exist?(File.expand_path(chef.cookbooks_path, root))\n  chef.run_list = [\"recipe[motd]\"]\nend","handlingStrategy":"validation","validationCode":"# Vagrantfile — validate every host-side chef path before `vagrant up`\nroot = File.dirname(__FILE__)\n%w[cookbooks_path roles_path data_bags_path environments_path nodes_path].each do |attr|\n  Array(chef.public_send(attr)).each do |entry|\n    path = entry.is_a?(Array) ? entry[1] : entry\n    next unless path.is_a?(String)\n    expanded = File.expand_path(path, root)\n    abort \"#{attr}: host path not found: #{expanded}\" unless File.exist?(expanded)\n  end\nend","typeGuard":"def host_chef_path_exists?(path, root_path)\n  File.exist?(File.expand_path(path.to_s, root_path))\nend","tryCatchPattern":null,"preventionTips":["Vendor/clone cookbooks, roles, and data bags before `vagrant up` (berks vendor, chef-cli downloads) as part of the project bootstrap.","Keep chef paths repo-relative and lowercase to avoid casing issues across Linux/macOS/Windows hosts.","Read the expanded %{path} printed by the warning — it tells you exactly which root Vagrant resolved against."],"tags":["chef-solo","vagrant","provisioning","cookbooks","file-path"],"backgroundTag":"host-path-not-found","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}