Open jelhan opened 4 years ago
@jelhan You can test the build by cloning https://github.com/joostdevries/twiddle-backend and running the test-ember-version-locally.sh script. I might not be able to get to this quickly. Please ask if you have any issues.
Thanks a lot for sharing that information.
I was able to reproduce the bug locally by running ./test-ember-version-locally.sh 3.18.0 ember-bootstrap 4.0.0
. But the stack trace is not that helpful:
ERROR Summary:
- broccoliBuilderErrorStack: [undefined]
- code: [undefined]
- codeFrame: [undefined]
- errorMessage: [Embroider:MacrosConfig] cannot read userConfigs until MacrosConfig has been finalized.
- errorType: [undefined]
- location:
- column: [undefined]
- file: [undefined]
- line: [undefined]
- message: [Embroider:MacrosConfig] cannot read userConfigs until MacrosConfig has been finalized.
- name: Error
- nodeAnnotation: [undefined]
- nodeName: [undefined]
- originalErrorMessage: [undefined]
- stack: Error: [Embroider:MacrosConfig] cannot read userConfigs until MacrosConfig has been finalized.
at MacrosConfig.get userConfigs [as userConfigs] (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/@embroider/macros/src/macros-config.js:98:19)
at Object.get userConfigs [as userConfigs] (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/@embroider/macros/src/macros-config.js:133:29)
at _clone (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/clone/clone.js:162:31)
at _clone (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/clone/clone.js:162:18)
at _clone (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/clone/clone.js:162:18)
at _clone (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/clone/clone.js:162:18)
at clone (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/clone/clone.js:202:10)
at Class._getAddonProvidedConfig (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/ember-cli-babel/index.js:251:19)
at Class._getBabelOptions (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/ember-cli-babel/index.js:270:36)
at Class.buildBabelOptions (/home/jelhan/tmp/twiddle-backend/tmp/3.18.0/node_modules/ember-cli-babel/index.js:33:17)
Will try to dig deeper into it later. Just wanted to leave this here for reference in case someone else has the time to pick it up earlier.
See also https://github.com/embroider-build/embroider/issues/882
Is there a way to override low-level things like ember-cli-handlebars
in a twiddle?
If an addon is using
@embroider/macros
the build fails:To be honest I'm not 100%ly sure if embroider build time macros are causing the issue. I'm seeing the above error message with
ember-bootstrap@^4.0.0
. As far as I'm aware it's the only addon using@embroider/macros
. So I haven't tested with any other.Please not that
@embroider/macros
are working fine in a default ember project. They do not require embroider build.I have tested on ember-twiddle.com and canary.ember-twiddle.com. Adding
{ "ember-bootstrap": "4.0.0" }
to the list of addons is enough to see the error.