{"record":{"id":"62bebe6e4be8a242","repo":"emberjs/ember.js","slug":"is-not-a-supported-path-in-glimmer-check-for","errorCode":null,"errorMessage":"'.' is not a supported path in Glimmer; check for a path with a trailing '.'","messagePattern":"'\\.' is not a supported path in Glimmer; check for a path with a trailing '\\.'","errorType":"validation","errorClass":"SyntaxError","httpStatus":null,"severity":"error","filePath":"packages/@glimmer/syntax/lib/parser/handlebars-node-visitors.ts","lineNumber":418,"sourceCode":"          `Using \"./\" is not supported in Glimmer and unnecessary`,\n          this.source.spanFor(path.loc)\n        );\n      }\n      if (original.slice(0, 3) === '../') {\n        throw generateSyntaxError(\n          `Changing context using \"../\" is not supported in Glimmer`,\n          this.source.spanFor(path.loc)\n        );\n      }\n      if (original.indexOf('.') !== -1) {\n        throw generateSyntaxError(\n          `Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths`,\n          this.source.spanFor(path.loc)\n        );\n      }\n      parts = [path.parts.join('/')];\n    } else if (original === '.') {\n      throw generateSyntaxError(\n        `'.' is not a supported path in Glimmer; check for a path with a trailing '.'`,\n        this.source.spanFor(path.loc)\n      );\n    } else {\n      parts = path.parts;\n    }\n\n    let thisHead = false;\n\n    // This is to fix a bug in the Handlebars AST where the path expressions in\n    // `{{this.foo}}` (and similarly `{{foo-bar this.foo named=this.foo}}` etc)\n    // are simply turned into `{{foo}}`. The fix is to push it back onto the\n    // parts array and let the runtime see the difference. However, we cannot\n    // simply use the string `this` as it means literally the property called\n    // \"this\" in the current context (it can be expressed in the syntax as\n    // `{{[this]}}`, where the square bracket are generally for this kind of\n    // escaping – such as `{{foo.[\"bar.baz\"]}}` would mean lookup a property\n    // named literally \"bar.baz\" on `this.foo`). By convention, we use `null`","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/syntax/lib/parser/handlebars-node-visitors.ts#L400-L436","documentation":"A path expression that is exactly '.' is meaningless in Glimmer and usually indicates a typo such as a trailing dot ({{foo.}}) or a lone {{.}}. The parser's PathExpression visitor special-cases original === '.' and throws a syntax error pointing at the path's location.","triggerScenarios":"Compiling a template containing the bare path expression {{.}} or {{^x.}}-style trailing-dot typos that reduce to '.', e.g. {{item.}} normally fails earlier, but any expression whose original normalizes to '.' hits this branch. Thrown in the else-if (original === '.') arm of the visitor.","commonSituations":"Hand-editing templates and leaving a trailing '.' after deleting a property name; copy/paste artifacts; macro or codegen tools emitting {{.}} for 'current context' (a handlebars.js-ism not supported by Glimmer).","solutions":["Replace {{.}} with the explicit reference you want: use {{this}} for the current component/element context, or the specific block param name.","Check the indicated location for a trailing '.' and remove it or complete the property name ({{item.}} → {{item.name}}).","If you meant to print the whole context, bind it to a variable first ({{#let this as |ctx|}}{{ctx.name}}{{/let}}) — although rendering raw context is usually a mistake."],"exampleFix":"// before\n{{#each items as |item|}}\n  {{item.}}\n{{/each}}\n\n// after\n{{#each items as |item|}}\n  {{item.name}}\n{{/each}}","handlingStrategy":"validation","validationCode":"// detect bare/trailing-dot paths before compiling\nfunction assertNoBareDot(template) {\n  if (/{{\\s*\\.\\s*}}/.test(template)) throw new Error(\"Bare '.' path found; use an explicit reference\");\n  if (/{{[^}]*\\.\\s*}}/.test(template)) throw new Error(\"Possible trailing '.' in a path\");\n}\nassertNoBareDot(template);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never write a trailing dot after a property name","Use {{this}} to reference the current context explicitly","Review editor auto-complete output before saving templates","Grep templates for '{{.' as a pre-commit check"],"tags":["glimmer","handlebars","template-syntax","trailing-dot"],"backgroundTag":"glimmer-unsupported-path","analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}