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

esm from private-build-infra should be removed as it patches Object #8021

Closed
NullVoxPopuli opened this issue Jul 9, 2022 · 6 comments · Fixed by #8042
Closed

esm from private-build-infra should be removed as it patches Object #8021

NullVoxPopuli opened this issue Jul 9, 2022 · 6 comments · Fixed by #8042

Comments

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Jul 9, 2022

Visit this StackBlitz URL: https://stackblitz.com/github/NullVoxPopuli/ember-cli-editor-output/tree/stackblitz-app-patched-broccoli?file=README.md
(which is a fork of the automated output on July 9, 2022: https://stackblitz.com/github/ember-cli/editor-output/tree/stackblitz-app-output)
I've already applied the patch here (via patch-package): broccolijs/broccoli#499

Note the stack trace (when running npm start).

$ ember serve
ReferenceError: Object is not defined
    at Function.build (/home/projects/qgniypgzz.github/node_modules/console-ui/node_modules/chalk/index.js:129:2)
    at Function.get (/home/projects/qgniypgzz.github/node_modules/console-ui/node_modules/chalk/index.js:61:17)
    at writeError (/home/projects/qgniypgzz.github/node_modules/console-ui/lib/write-error.js:101:24)
    at UI.writeError (/home/projects/qgniypgzz.github/node_modules/console-ui/lib/index.js:167:20)
    at CLI.logError (/home/projects/qgniypgzz.github/node_modules/ember-cli/lib/cli/cli.js:318:13)
    at CLI.run (/home/projects/qgniypgzz.github/node_modules/ember-cli/lib/cli/cli.js:253:12)
    at async module.exports (/home/projects/qgniypgzz.github/node_modules/ember-cli/lib/cli/index.js:145:12)

This means that Object is still getting patched -- so let's figure out where that's coming from...

run: rm -rf node_modules/esm and run npm start again.

This stacktrace points at private-build-infra:

❯ npm start
$ ember serve
Cannot find module 'esm'
Require stack:
- /home/projects/qgniypgzz.github/node_modules/@ember-data/private-build-infra/src/packages.js
- /home/projects/qgniypgzz.github/node_modules/@ember-data/private-build-infra/src/debug-macros.js
- /home/projects/qgniypgzz.github/node_modules/@ember-data/private-build-infra/src/stripped-build-plugins.js
- /home/projects/qgniypgzz.github/node_modules/@ember-data/private-build-infra/src/addon-build-config-for-data-package.js
- /home/projects/qgniypgzz.github/node_modules/ember-data/index.js
- /home/projects/qgniypgzz.github/node_modules/ember-cli/lib/models/package-info-cache/package-info.js
- /home/projects/qgniypgzz.github/node_modules/ember-cli/lib/models/package-info-cache/index.js
- /home/projects/qgniypgzz.github/node_modules/ember-cli/lib/models/project.js
- /home/projects/qgniypgzz.github/node_modules/ember-cli/lib/utilities/get-config.js
- /home/projects/qgniypgzz.github/node_modules/ember-cli/lib/utilities/instrumentation.js
- /home/projects/qgniypgzz.github/node_modules/ember-cli/lib/cli/index.js
- /home/projects/qgniypgzz.github/node_modules/ember-cli/bin/ember

After removing ember-data from the package.json, and re-running npm start:

(tbd, getting distracted)

Description

Trying to get ember to work at all on modern web tooling has been a multi-year uphill battle, and with just some minor tweaks (similar to what my broccoli PR is doing), we can get there. We're close 🥳

why not work with existing stuff?

  • twiddle -- all hax and unmaintian (for ~2 years, now?)
  • code sand box -- plagued by caching issues with their "container" implementation and is the most frustrating editor experience
  • glitch -- not enough ram to actually run the full ember experience reliably (glitch seems more for toy projects)

Versions

any? idk see links above. (4.4)


Thanks again!
The ember-data Team <3

<3

@runspired
Copy link
Contributor

Unfortunately we cannot drop esm until we drop support for node 12 (and potentially node 14?).

@runspired
Copy link
Contributor

closing as duplicate of #7379

@NullVoxPopuli
Copy link
Contributor Author

I think 14 supports ESM, and 12 has been EOL'd

@runspired
Copy link
Contributor

runspired commented Jul 15, 2022

@NullVoxPopuli 12 is still LTS and still supported by ember-cli for roughly another 246 weeks.

@NullVoxPopuli
Copy link
Contributor Author

It's just not even listed here: https://nodejs.org/en/about/releases/

@runspired
Copy link
Contributor

@NullVoxPopuli it's possible we took long enough to release 4.4 and 4.5 that this is no longer the plan: https://github.com/ember-cli/ember-cli/blob/master/docs/node-support.md

@runspired runspired linked a pull request Jul 23, 2022 that will close this issue
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.

2 participants