glimmerjs/glimmer-application

Nested components don't appear to work as documented

justinross opened this issue · 2 comments

Following the documentation here, creating a nested component does not allow the component to render. Even when called from within the appropriate parent component's template, an error "Could not find a template for " is thrown.

image

Expected Behavior

The child component should render when referenced in the appropriate parent component

Actual Behavior

Error "Could not find a template for " is thrown.

Steps to Reproduce the issue

Create a component
ember g glimmer-component parent-component

Create a child component
ember g glimmer-component parent-component/child-component

Add to parent-component/template.hbs:
<child-component/>

Here's a minimal repo that demonstrates this behavior.
https://bitbucket.org/justinross/nestedcompglimmer

Running ember-cli 2.14.0-beta.2

Attempts to Solve the issue

Checked my file/folder/template/component naming several times. Have not yet tried a different version of ember-cli

CvX commented

There's a bug in… I'd guess glimmer-resolver that mixes up modulePrefix from config/environment.js and name from package.json.
There's a simple workaround: change either of those strings to the other one, so that they are the same, and the child-component will work.

locks commented

Rob helped me track down the problem, which that the project was camelCaseNamed, which explains the difference between modulePrefix and name that @CvX referred to: https://github.com/glimmerjs/glimmer-blueprint/blob/4c8cc17d9fbd076b80dddf9ac5738c77fb07d041/index.js#L15-L16.