You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an addon (direct-addon) has a dependency onto another addon (intermediary-addon) that depends on a third addon (transitive-addon) that provides virtual modules, the build breaks.
host-app
app with a direct dependency on direct-addon
direct-addon
addon with a direct dependency on intermediary-addon
composes local-classes from intermediary-addon physical .css files
intermediary-addon
addon with a direct dependency on transitive-addon
imports @values or composes local-classes from transitive-addon's virtual modules
transitive-addon
an addon without any physical .css files
provides virtual modules
Running ember s inside intermediary-addon works.
But running ember s inside direct-addon or host-app does not.
The actual error thrown is:
Error: Unable to resolve styles module 'transitive-addon/virtual-module' imported from '/Users/jan/demo/direct-addon/addon/components/some-component/styles.css'. No virtual module with that name was defined and no corresponding addon was found.
at resolveExternalPath (/Users/jan/demo/node_modules/ember-css-modules/lib/resolve-path.js:55:11)
at ModulesPreprocessor.resolvePath [as _resolvePath] (/Users/jan/demo/node_modules/ember-css-modules/lib/resolve-path.js:14:12)
at ModulesPreprocessor.resolvePath (/Users/jan/demo/node_modules/ember-css-modules/lib/modules-preprocessor.js:185:17)
at ModulesPreprocessor.resolveAndRecordPath (/Users/jan/demo/node_modules/ember-css-modules/lib/modules-preprocessor.js:156:25)
at CSSModules.fetchExports (/Users/jan/demo/node_modules/broccoli-css-modules/index.js:138:29)
at fetchImport (/Users/jan/demo/node_modules/broccoli-css-modules/lib/link-modules.js:40:34)
at /Users/jan/demo/node_modules/broccoli-css-modules/lib/link-modules.js:31:20
at Root.each (/Users/jan/demo/node_modules/postcss/lib/container.js:105:16)
at fetchAllImports (/Users/jan/demo/node_modules/broccoli-css-modules/lib/link-modules.js:29:7)
at /Users/jan/demo/node_modules/broccoli-css-modules/lib/link-modules.js:19:24
But it gets swallowed as:
Error: Unable to locate module "direct-addon/components/some-component/styles" imported from /var/folders/zd/7ly06mpn2t512t2fr1g1ppw80000gq/T/broccoli-88502T1X0zlnjt79z/out-3664-module_source_funnel/direct-addon/components/other-component/styles.css
at ModulesPreprocessor.onModuleResolutionFailure (/Users/jan/demo/node_modules/ember-css-modules/lib/modules-preprocessor.js:133:11)
at /Users/jan/demo/node_modules/broccoli-css-modules/lib/link-modules.js:54:13
at tryCatcher (/Users/jan/demo/node_modules/rsvp/dist/lib/rsvp/-internal.js:39:19)
at invokeCallback (/Users/jan/demo/node_modules/rsvp/dist/lib/rsvp/-internal.js:211:31)
at publish (/Users/jan/demo/node_modules/rsvp/dist/lib/rsvp/-internal.js:197:7)
at publishRejection (/Users/jan/demo/node_modules/rsvp/dist/lib/rsvp/-internal.js:132:3)
at flush (/Users/jan/demo/node_modules/rsvp/dist/lib/rsvp/asap.js:80:5)
at processTicksAndRejections (internal/process/task_queues.js:75:11)
When I add transitive-addon as a direct dependency to direct-addon as well, it works.
The text was updated successfully, but these errors were encountered:
If an addon (
direct-addon
) has a dependency onto another addon (intermediary-addon
) that depends on a third addon (transitive-addon
) that provides virtual modules, the build breaks.host-app
direct-addon
direct-addon
intermediary-addon
composes
local-classes fromintermediary-addon
physical.css
filesintermediary-addon
transitive-addon
@value
s orcomposes
local-classes fromtransitive-addon
's virtual modulestransitive-addon
.css
filesRunning
ember s
insideintermediary-addon
works.But running
ember s
insidedirect-addon
orhost-app
does not.The actual error thrown is:
But it gets swallowed as:
When I add
transitive-addon
as a direct dependency todirect-addon
as well, it works.The text was updated successfully, but these errors were encountered: