-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Canary fails build with "unable to locate global object" #19431
Comments
This is during template compilation, and I see the changes from ember-cli/ember-cli-htmlbars#660 in the stack. That PR does change what Global’s are available and might be what is causing this. The other changes that I landed here for the template compiler seem somewhat less likely to be the culprit but are possibly combining with that change in a bad way 🤔 |
I think that this detection no longer works (combined with that ember-cli-htmlbars PR): ember.js/packages/loader/lib/index.js Lines 6 to 19 in 7c39e15
I will dig in this morning, I thought that |
Ya, so basically in Node < 12 I tested the following: const { inspect } = require('util');
const vm = require('vm');
let script = new vm.Script('(() => globalThis)()');
let context = vm.createContext({});
console.log(script.runInContext(context)); When running on < 12 you get:
|
This would have caught the error reported in emberjs/ember.js#19431, we should run with the lowest supported Node version.
The fix is released in https://github.com/ember-cli/ember-cli-htmlbars/releases/tag/v5.6.1, sorry about that @simonihmig! |
Oh, also, thank you very much for reporting! |
Np, thanks for the quick fix! 👍 |
🐞 Describe the Bug
It seems pretty much all my addons are failing to build as of today at least (scheduled CI runs) with that error at build-time.
🔬 Minimal Reproduction
Just a small sample of addons failing CI:
😕 Actual Behavior
Ember-try scenario for current canary is failing with that build error.
🤔 Expected Behavior
Uh, build successfully? 😆
🌍 Environment
See CI env.
The text was updated successfully, but these errors were encountered: