srowhani / ember-artisans

An abstraction layer around using web-workers in Ember.js
https://srowhani.github.io/ember-artisans
25 stars 3 forks source link

Build error on embroider: Could not find app javascript in index.html #27

Open johanrd opened 3 years ago

johanrd commented 3 years ago

When building an app with embroider with ember-artisans, I get the following error:

Build Error (OneShot)

Unexpected character '' (Note that you need plugins to import files that are not JavaScript)
        at BroccoliRollup
-~- created here: -~-
    at new Plugin (/dir/node_modules/broccoli-rollup/node_modules/broccoli-plugin/index.js:31:32)
    at new BroccoliRollup (/dir/node_modules/broccoli-rollup/dist/index.js:15:9)
    at rollup (/dir/node_modules/broccoli-rollup/dist/index.js:10:12)
    at Object.apply (/dir/node_modules/broccoli-rollup/index.js:9:20)
    at /dir/node_modules/ember-artisans/index.js:13:5
    at Array.map (<anonymous>)
    at treeFactory (/dir/node_modules/ember-artisans/index.js:12:21)
    at buildWorkerTrees (/dir/node_modules/ember-artisans/lib/worker-tree.js:11:14)
    at Class.treeForPublic (/dir/node_modules/ember-artisans/index.js:44:10)
    at Class._treeFor (/dir/node_modules/ember-cli/lib/models/addon.js:668:33)
    at /dir/node_modules/@embroider/compat/src/v1-addon.js:544:43
    at V1Addon.throughTreeCache (/dir/node_modules/@embroider/compat/src/v1-addon.js:490:20)
    at V1Addon.invokeOriginalTreeFor (/dir/node_modules/@embroider/compat/src/v1-addon.js:532:21)
    at V1Addon.buildPublicTree (/dir/node_modules/@embroider/compat/src/v1-addon.js:778:33)
    at V1Addon.build (/dir/node_modules/@embroider/compat/src/v1-addon.js:865:14)
    at V1Addon.<anonymous> (/dir/node_modules/@embroider/compat/node_modules/typescript-memoize/dist/memoize-decorator.js:100:52)
-~- (end) -~-

Any ideas for a workaround or fix? I tried to create create a reproducible example for testing against embroider with a fork from this repository. See here: https://github.com/johanrd/ember-artisans.

When running EMBER_TRY_SCENARIO=embroider-safe ember test there, I stumbled upon the following error:

Build Error (WaitForTrees)
could not find app javascript in index.html

Thanks

srowhani commented 3 years ago

Interesting. Thanks for reporting. Embroider support would be huge, and any PR's would be welcome.