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

Bind must be called on a function #165

Closed
NullVoxPopuli opened this issue Jun 6, 2021 · 7 comments
Closed

Bind must be called on a function #165

NullVoxPopuli opened this issue Jun 6, 2021 · 7 comments

Comments

@NullVoxPopuli
Copy link

Describe the bug:
When trying to boot up an Ember app, I get this error: Bind must be called on a function
The stack in the log points at some minified file, so I'm not sure how to best see what is going on -- but on a real machine, the same code runs just fine.

 - stack: TypeError: Bind must be called on a function
    at bind (<anonymous>)
    at Object.eval [as bind] (/home/projects/gqaimkxpv.github/node_modules/esm/esm.js:3:33198)
    at eval (/home/projects/gqaimkxpv.github/node_modules/esm/esm.js:3:37215)
    at Object.eval (/home/projects/gqaimkxpv.github/node_modules/esm/esm.js:3:37490)
    at r (/home/projects/gqaimkxpv.github/node_modules/esm/esm.js:3:613)
    at eval (/home/projects/gqaimkxpv.github/node_modules/esm/esm.js:3:805)
    at eval (/home/projects/gqaimkxpv.github/node_modules/esm/esm.js:3:815)
    at D (/home/projects/gqaimkxpv.github/node_modules/esm/esm.js:1:821)
    at Object.eval (/home/projects/gqaimkxpv.github/node_modules/esm/esm.js:1:1479)
    at Object.function (https://gqaimkxpv--github.jw.staticblitz.com/blitz.cb1eb6b301af424e8dffb694972509f06ea6b5db.js:11:15318)

Link to the blitz that caused the error: https://stackblitz.com/github/ember-cli/ember-new-output/tree/stable?file=package.json

Steps to reproduce:

  1. Go to the linked blitz
  2. run npm start
  3. See error

Expected behavior:
dev server boots (there may be other errors between now and then, as the previous error was #53, so we'll see what we run in to next!)

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 91.0.4472.77 (Official Build) (64-bit)
@SamVerschueren
Copy link
Contributor

I'm not entirely sure, but it looks like something ESM related. We don't support ESM yet unfortunately. But the Node.je ecosystem is adapting so it's definitely on the radar as one of the big first things we have to tackle.

The node-esm package, which looks like it's the one that's failing, doesn't work either. I haven't looked into why that is though so can't give you feedback yet on that front.

@NullVoxPopuli
Copy link
Author

any updates? I'm very excited to try this out, but node ESM is pretty much a requirement for all my work <3

@d3lm
Copy link

d3lm commented Jul 1, 2021

Hey there! Thanks for reporting this issue. It's indeed related to some internals on our end. I am actually working on ESM built-in support and part of this effort, I have fixed some issues that break the esm package you're using. So I'd say stay tuned and hang in for a bit longer. ESM is cooking 🧑‍🍳

@NullVoxPopuli
Copy link
Author

Here is a minimal reproduction https://stackblitz.com/edit/node-fofpws?file=index.js

@NullVoxPopuli NullVoxPopuli changed the title Bind must be called on a function (minimal repro needed) Bind must be called on a function Jul 17, 2021
@NullVoxPopuli
Copy link
Author

Sorry to bother, but any updates? This is the current known blocker for emberjs folks to use stackblitz ❤️

@SamVerschueren
Copy link
Contributor

I believe you tweeted it yourself, but this works now 🎉. Let us know if you run into any issues 🙏 .

@NullVoxPopuli
Copy link
Author

Thank youuuuuu!

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

No branches or pull requests

3 participants