Skip to content
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

Remove esm package #498

Open
NullVoxPopuli opened this issue Jun 1, 2022 · 6 comments · May be fixed by #499
Open

Remove esm package #498

NullVoxPopuli opened this issue Jun 1, 2022 · 6 comments · May be fixed by #499

Comments

@NullVoxPopuli
Copy link

the esm package is the last thing preventing ember from running in webcontainers.

See:

@NullVoxPopuli
Copy link
Author

NullVoxPopuli commented Jun 1, 2022

It looks like esm is only used for loading the brocfile

❯ git grep esm
README.md:Typescript by default only allows the [ES6 modules](https://nodejs.org/api/esm.html) `import/export` syntax to work
README.md:Broccoli supports [ES6 modules](https://nodejs.org/api/esm.html) via [esm](https://www.npmjs.com/package/esm) for
lib/load_brocfile.ts:import esm from 'esm';
lib/load_brocfile.ts:const esmRequire = esm(module);
lib/load_brocfile.ts:    // Load brocfile via esm shim
lib/load_brocfile.ts:    brocfile = esmRequire(brocfilePath);

since ember doesn't use brocfiles -- is there a way to opt out of this behavior and prevent esm from being loaded at all? (it monkey patches node globals, which breaks tools like stackblitz)

@acorncom
Copy link

acorncom commented Jun 3, 2022

Ember-CLI did use Brocfiles at one point (I remember dealing with them) but apparently that was in https://github.com/ember-cli/ember-cli/tree/v0.2.7/blueprints/app/files before the jump to 1.13 when ember-cli became the default. Given that that was 8 years ago I imagine the current Ember-CLI doesn’t need to support that far back … 😉

@lifeart
Copy link
Contributor

lifeart commented Oct 30, 2024

Have ember-cli build error on node@22 because of this package.

image

5bd1883

@NullVoxPopuli
Copy link
Author

do you have a repro repo? it's been a while since I've seen this one

@lifeart
Copy link
Contributor

lifeart commented Oct 30, 2024

@NullVoxPopuli yes, it's here: Brain-up/brn#2631
Trying to bump node to latest

cd frontend
yarn instal
npm run build

@NullVoxPopuli
Copy link
Author

looks like ember-data needs upgraded -- ember-data/private-build-infra uses, and private-build-infra moving off of ESM is what unblocked stackblitz from working.

@ember-data/private-build-infra @ 3.28.7 is just too old

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants