ember-cli / ember-cli/ember-twiddle

Build fails for addons that are using `@embroider/macros`

Open
#732 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
268
Forks
87
PR merge metrics
No merged PRs in 30d

Description

If an addon is using `@embroider/macros` the build fails:

```
- Installing addon package

- Installing addon package
Installing packages... This might take a couple of minutes.
- Installing addon package
- npm: Installing ember-bootstrap@4.0.0 ...
npm: Installed ember-bootstrap@4.0.0
installing ember-bootstrap
Installing for Bootstrap 4 using preprocessor none
install package bootstrap

Installing packages... This might take a couple of minutes.
- npm: Installing bootstrap@^4.3.1 ...
npm: Installed bootstrap@^4.3.1
Configuration file could not be edited. Manually update your ember-cli-build.js to include 'ember-bootstrap': {"bootstrapVersion":4,"importBootstrapCSS":true}
Installed addon package.
- Building
[Embroider:MacrosConfig] cannot read userConfigs until MacrosConfig has been finalized.

Stack Trace and Error Report: /tmp/error.dump.67c8db1caf05113d786b2c2ccd26a6b8.log

No addon.js created
```

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.