-
Notifications
You must be signed in to change notification settings - Fork 142
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
unable to resolve package {addon-name}
when using HFTNB syntax to reference components in the same addon
#1072
Comments
If somebody wants to debug and fix this I will merge PRs, but please understand that That addon tells you not to use it, it was deliberately named with a silly name so people wouldn't use it in production. |
After looking at the reproduction briefly, it seems that there is no way for this to ever resolve "itself": embroider/packages/shared-internals/src/package-cache.ts Lines 8 to 26 in f7a4ad0
If you called Changing that code above to something like this might work (though @ef4 would have to chime in RE: the validity): let result = getOrCreate(cache, packageName, () => {
// the type cast is needed because resolvePackagePath itself is erroneously typed as `any`.
let packagePath = resolvePackagePath(packageName, this.basedir(fromPackage)) as string | null;
if (!packagePath) {
if (fromPackage.isV2Addon() && fromPackage.name === packageName) {
return fromPackage;
} else {
// this gets our null into the cache so we don't keep trying to resolve
// a thing that is not found
return null;
}
}
return this.get(dirname(packagePath));
}); |
this seems to be impacting Service Injection as well? |
Should be resolved by #1170 |
hi, it seems that the service usage of batman syntax is still not resolved with embroider 1.6 :( |
repo to reproduce: https://github.com/yangpiao/test-hftnb-embroider
Ran into this build error when I use HFTNB syntax in an addon to reference other components / helpers in the same addon.
E.g.
I have set
excludeNestedAddonTransforms
totrue
, and thestatic*****
options totrue
as well (ember-cli-build.js).Build output:
The text was updated successfully, but these errors were encountered: