Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds failing with template imports not found #1300

Closed
vlascik opened this issue Nov 30, 2022 · 2 comments · Fixed by #1307
Closed

Builds failing with template imports not found #1300

vlascik opened this issue Nov 30, 2022 · 2 comments · Fixed by #1307

Comments

@vlascik
Copy link
Contributor

vlascik commented Nov 30, 2022

After updating to 2.0.1 and 2.0.2, build keeps failing with

Module not found: Error: Can't resolve './template' in '$TMPDIR\embroider\864ay1\Project\node_modules\ember-table\components\-private\scroll-indicators\component.js'

in scroll-indicators\component.js the ember-table is doing:

import layout from './template';

embroider creates $TMPDIR\embroider\864ay1\Project\node_modules\ember-table\components\-private\scroll-indicators\template.hbs.js file with content like this:

import { precompileTemplate } from "@ember/template-compilation";
export default precompileTemplate(" ...< actual hbs content of template.hbs> ...", {
  moduleName: "ember-table/components/-private/scroll-indicators/template.hbs"
});

but the file is not resolved at import. I imagine there is a problem with changes related to the babel precompilation plugin and the changed .hbs extensions somewhere?

embroider v2.0.2 on Windows, every package at latest as of now.

EDIT: after changing the import line to

import layout from './template.hbs';

the build passed.

@ef4
Copy link
Contributor

ef4 commented Dec 13, 2022

I was looking at this with @void-mAlex and we think we see the bug here. The resolvable extensions list probably needs to expand .hbs to both .hbs and .hbs.js as fallout from the changes made in our 2.0 release.

@void-mAlex
Copy link
Collaborator

and now pr is up

@ef4 ef4 closed this as completed in #1307 Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants