question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@babel/template placeholder build error resurrection

See original GitHub issue

Since the release of ember-get-config v1 (which uses @embroider/macros v0.50.0) several people in the Discord are seeing the following errors at build time:

broccoliBuilderErrorStack: Error: @babel/template placeholder "APP": Expected string substitution

This seems to be the issue that was fixed by this commit and was included in the 0.43.0 release of @embroider/macros.

In our app the issue is triggered by @embroider/macros v0.41.0 which is included by the ember-element-helper addon. What’s strange is that that version of the macros didn’t cause issues until a v0.50.0 release was part of our node_modules folder.

I’m unfamiliar with how this works so my debugging efforts didn’t lead to something useful. Did anything change in the latest release that might explain this behavior? It probably worked by accident before and we should PR version bumps of the macro packages to all addons?

npm ls @embroider/macros of our project:

├─┬ ember-auto-import@1.12.0
│ └─┬ @embroider/core@0.33.0
│   └── @embroider/macros@0.33.0 
├─┬ ember-cli-moment-shim@3.8.0
│ └─┬ ember-get-config@1.0.0
│   └── @embroider/macros@0.50.1 
└─┬ ember-power-select@4.1.7
  └─┬ ember-basic-dropdown@3.1.0
    ├─┬ @ember/render-modifiers@2.0.2
    │ └── @embroider/macros@0.50.1 
    ├── @embroider/macros@0.47.2 
    ├─┬ @embroider/util@0.47.2
    │ └── @embroider/macros@0.47.2 
    └─┬ ember-element-helper@0.5.5
      └─┬ @embroider/util@0.41.0
        └── @embroider/macros@0.41.0 

Discord discussion: https://discord.com/channels/480462759797063690/930822209725948004

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:17
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

9reactions
ef4commented, Jan 19, 2022

Ok, so 1.0 is released. Please spread the word, addons should depend on "@embroider/macros": "^1.0.0". There are no breaking changes in 1.0.

In the meantime, both yarn and npm now support overriding transitive dependencies. In the case of @embroider/macros it is safe to replace all of 0.x with ^1.0.0.

NPM added overrides in 8.3. Yarn has resolutions.

4reactions
ef4commented, Jan 19, 2022

So it seems to be related to ember-get-config’s usage of the macros.

Ah, this is the actual issue. The format of the data that ember-get-config is storing in the macros is what triggers the bug. It’s not really about version skew at all.

We could backport the fix and do patch releases, but we’d potentially need to manage 17 different patch releases, because the oldest embroider/macros mentioned here is 17 major releases behind.

I think the biggest thing we can do to help here is to cut a 1.0 release, so that the pain of asking addons to upgrade can happen once and then they’ll be on a series that we can actually support with patch releases going forward.

I had been waiting to release a 1.0 until after solving some known limitations, but we’re past the point where it’s practical to consider this stuff prerelease.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regression in babel-template with uppercase variables not ...
Expected Behavior. returns the template with NODE replaced. Current Behavior. Error: No substitution given for "NODE_ENV" at ...
Read more >
babel/template
When calling template as a function with a string argument, you can provide placeholders which will get substituted when the template is used....
Read more >
@babel/template | Yarn - Package Manager
Intro. Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain...
Read more >
Understanding (all) JavaScript module formats and tools
When you build an application with JavaScript, you always want to modularize your code. However, JavaScript language was initially invented ...
Read more >
Bep - River Thames Conditions - Environment Agency - GOV.UK
Quality manual control of records, Metro 2033 error 53, ... Dopest ethiopian vine, Church building use policy template, Cable para control xbox 360...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found