{"record":{"id":"a9f73f331b01da39","repo":"charmbracelet/vhs","slug":"literal-expects-one-string","errorCode":null,"errorMessage":"${literal} expects one string","messagePattern":"(.+?) expects one string","errorType":"validation","errorClass":"parser.Error","httpStatus":null,"severity":"error","filePath":"parser/parser.go","lineNumber":560,"sourceCode":"\treturn cmd\n}\n\n// parseHide parses a Hide command.\n//\n//\tHide\nfunc (p *Parser) parseHide() Command {\n\tcmd := Command{Type: token.HIDE}\n\treturn cmd\n}\n\n// parseRequire parses a Require command.\n//\n//\tRequire\nfunc (p *Parser) parseRequire() Command {\n\tcmd := Command{Type: token.REQUIRE}\n\n\tif p.peek.Type != token.STRING {\n\t\tp.errors = append(p.errors, NewError(p.peek, p.cur.Literal+\" expects one string\"))\n\t}\n\n\tcmd.Args = p.peek.Literal\n\tp.nextToken()\n\n\treturn cmd\n}\n\n// parseShow parses a Show command.\n//\n//\tShow\nfunc (p *Parser) parseShow() Command {\n\tcmd := Command{Type: token.SHOW}\n\treturn cmd\n}\n\n// parseType parses a type command.\n// A type command takes a string to type.","sourceCodeStart":542,"sourceCodeEnd":578,"githubUrl":"https://github.com/charmbracelet/vhs/blob/c073383b5de0b1f57bf514113029c306bc986539/parser/parser.go#L542-L578","documentation":"Fires in parseRequire when the token after the Require command is not a STRING, meaning no file path to require was supplied. The command is still built with whatever token was found and the error is recorded; Require continues with a garbage/empty argument.","triggerScenarios":"Thrown at parser/parser.go:560 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass exactly one quoted or plain string path after Require, e.g. Require vars.tape","Check that the path was not accidentally consumed by the previous line or split across lines","Remove the Require line if nothing needs to be required"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c073383b5de0b1f57bf514113029c306bc986539","analyzedAt":"2026-09-02T01:53:05.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}