error when used in an engine
kellyselden opened this issue · 5 comments
kellyselden commented
It works when in a normal in-repo-addon's dependencies, but when I convert it to an engine, I get:
The Broccoli Plugin: [BroccoliMergeTrees] failed with:
Error: ENOENT: no such file or directory, open '/Users/kelly.selden/Sites/dustbunny/tmp/source_map_concat-input_base_path-Zc6lPjy5.tmp/vendor/ember-test-selectors/patch-component.js'
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:491:33)
at SourceMap.addFile (/Users/kelly.selden/Sites/dustbunny/node_modules/fast-sourcemap-concat/lib/source-map.js:75:31)
at /Users/kelly.selden/Sites/dustbunny/node_modules/broccoli-concat/concat.js:200:16
at Array.forEach (native)
at Concat.<anonymous> (/Users/kelly.selden/Sites/dustbunny/node_modules/broccoli-concat/concat.js:198:24)
at /Users/kelly.selden/Sites/dustbunny/node_modules/fast-sourcemap-concat/lib/source-map.js:399:12
at initializePromise (/Users/kelly.selden/Sites/dustbunny/node_modules/rsvp/dist/rsvp.js:567:5)
at new Promise (/Users/kelly.selden/Sites/dustbunny/node_modules/rsvp/dist/rsvp.js:1039:33)
at SourceMap.end (/Users/kelly.selden/Sites/dustbunny/node_modules/fast-sourcemap-concat/lib/source-map.js:386:10)
The broccoli plugin was instantiated at:
at BroccoliMergeTrees.Plugin (/Users/kelly.selden/Sites/dustbunny/node_modules/broccoli-plugin/index.js:7:31)
at new BroccoliMergeTrees (/Users/kelly.selden/Sites/dustbunny/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:16:10)
at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (/Users/kelly.selden/Sites/dustbunny/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:10:53)
at mergeTrees (/Users/kelly.selden/Sites/dustbunny/node_modules/ember-cli/lib/broccoli/merge-trees.js:85:33)
at Class.treeForPublic (/Users/kelly.selden/Sites/dustbunny/node_modules/ember-engines/lib/engine-addon.js:759:16)
at Class._treeFor (/Users/kelly.selden/Sites/dustbunny/node_modules/ember-cli/lib/models/addon.js:551:33)
at Class.treeFor (/Users/kelly.selden/Sites/dustbunny/node_modules/ember-engines/lib/engine-addon.js:933:23)
at project.addons.map.addon (/Users/kelly.selden/Sites/dustbunny/node_modules/ember-cli/lib/broccoli/ember-app.js:557:22)
at Array.map (native)
at EmberApp.addonTreesFor (/Users/kelly.selden/Sites/dustbunny/node_modules/ember-cli/lib/broccoli/ember-app.js:555:32)
Turbo87 commented
can you check if replacing app.import
with host.import
works?
kellyselden commented
I don't follow. My app is not using any app.import
s yet.
kellyselden commented
Ah you're talking about your internals. I changed to host, and it is working now.
Turbo87 commented
@kellyselden PR welcome
rickieshi commented
I have this problem when using ember-test-selectors
within a lazy-loaded engine. Seems to related to this issue here.
When running host app's test I got error related to ember-test-selectors/patch-component.js
not available. Changing back to using app.import will solve the problem but I'm not sure how to fix for all use cases.