{"record":{"id":"3caa01f3b249d997","repo":"hashicorp/packer","slug":"did-you-mean-to-use-q","errorCode":null,"errorMessage":"Did you mean to use %q?","messagePattern":"Did you mean to use %q\\?","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/core.go","lineNumber":248,"sourceCode":"\n\treturn r\n}\n\nfunc (c *Core) generateCoreBuildProvisioner(rawP *template.Provisioner, rawName string) (CoreBuildProvisioner, error) {\n\t// Get the provisioner\n\tcbp := CoreBuildProvisioner{}\n\n\tif !c.components.PluginConfig.Provisioners.Has(rawP.Type) {\n\t\terr := fmt.Errorf(\n\t\t\t\"The provisioner %s is unknown by Packer, and is likely part of a plugin that is not installed.\\n\"+\n\t\t\t\t\"You may find the needed plugin along with installation instructions documented on the Packer integrations page.\\n\\n\"+\n\t\t\t\t\"https://developer.hashicorp.com/packer/integrations?filter=%s\",\n\t\t\trawP.Type,\n\t\t\tstrings.Split(rawP.Type, \"-\")[0],\n\t\t)\n\n\t\tif sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Provisioners.List()); sugg != \"\" {\n\t\t\terr = fmt.Errorf(\"Did you mean to use %q?\", sugg)\n\t\t}\n\n\t\treturn cbp, err\n\t}\n\n\tprovisioner, err := c.components.PluginConfig.Provisioners.Start(rawP.Type)\n\tif err != nil {\n\t\treturn cbp, fmt.Errorf(\n\t\t\t\"error initializing provisioner '%s': %s\",\n\t\t\trawP.Type, err)\n\t}\n\t// Seems unlikely that a provisioner doesn't start successfully without error\n\tif provisioner == nil {\n\t\treturn cbp, fmt.Errorf(\n\t\t\t\"provisioner failed to be started and did not error: %s\", rawP.Type)\n\t}\n\n\treturn c.generateCoreBuildProvisionerWithProvisioner(rawP, rawName, provisioner)","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/core.go#L230-L266","documentation":"Packer could not find the provisioner named in the template among the installed/known provisioner plugins, so it searched the list of known provisioner names with the didyoumean fuzzy matcher and found a close candidate. Instead of the generic 'unknown provisioner' error, it replaces it with this suggestion so the developer can fix the type name typo.","triggerScenarios":"A template declares a provisioner whose `type` is not registered in PluginConfig.Provisioners (typo like 'shel' or missing plugin), AND NameSuggestion(rawP.Type, provisioners.List()) returns a non-empty fuzzy match, e.g. 'shel' vs 'shell'. Raised from generateCoreBuildProvisioner during Core.Build.","commonSituations":"Misspelling a built-in provisioner type ('shel', 'files' for 'file'), using a plugin whose binary is not installed or not on PACKER_PLUGIN_PATH, referencing a provisioner from a plugin version that was never installed.","solutions":["Fix the provisioner `type` in the template to the suggested name (e.g. 'shel' -> 'shell').","If the suggestion is wrong, install the missing plugin with `packer plugins install <plugin>`.","Run `packer plugins installed` / check PACKER_PLUGIN_PATH to confirm the plugin binary is discoverable.","Run `packer validate` on the template before building to catch unknown provisioner types early."],"exampleFix":"// before\n\"provisioners\": [{ \"type\": \"shel\", \"script\": \"setup.sh\" }]\n// after\n\"provisioners\": [{ \"type\": \"shell\", \"script\": \"setup.sh\" }]","handlingStrategy":"validation","validationCode":"// Pre-check installed provisioners before building (Go, using packer Core/plugin config)\nif !core.Components.PluginConfig.Provisioners.Has(pType) {\n    known := core.Components.PluginConfig.Provisioners.List()\n    return fmt.Errorf(\"provisioner %q not installed; known: %v\", pType, known)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy provisioner type names exactly from the docs/integrations page.","Run `packer validate` before every build to catch unknown types.","Keep required_plugins declared and run `packer init` after cloning templates.","List installed plugins with `packer plugins installed` when in doubt."],"tags":["provisioner","plugin","typo","configuration"],"backgroundTag":"unknown-plugin-type","analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}