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

[Bug] New ember app fails in production build #19912

Closed
miguelcobain opened this issue Jan 22, 2022 · 5 comments
Closed

[Bug] New ember app fails in production build #19912

miguelcobain opened this issue Jan 22, 2022 · 5 comments

Comments

@miguelcobain
Copy link
Contributor

miguelcobain commented Jan 22, 2022

🐞 Describe the Bug

After creating a new ember app and running the production build, there is a runtime error:

Uncaught TypeError: Cannot destructure property 'manager' of 'e' as it is null.

Disabling ember-cli-terser doesn't fix the problem, and I get the more readable version of the error:

Uncaught TypeError: Cannot destructure property 'manager' of 'resolvedDefinition' as it is null.

🔬 Minimal Reproduction

Run ember new my-app && cd my-app && ember s --environment=production

😕 Actual Behavior

We get a runtime error.

🤔 Expected Behavior

App should work without errors.

🌍 Environment

  • Ember: 4.1.0
  • Node.js/npm: 14.18.2 / 6.14.15
  • OS: MacOS Monterey
  • Browser: Chrome 97.0.4692.99
@miguelcobain miguelcobain changed the title [Bug] New ember app app fails in production build [Bug] New ember app fails in production build Jan 22, 2022
@NullVoxPopuli
Copy link
Contributor

It's the welcome page!
image

@NullVoxPopuli
Copy link
Contributor

Opened issue on welcome page here: ember-cli/ember-welcome-page#385

So, if anyone else comes across this issue, the fix is to delete <WelcomePage /> from application.hbs

@locks
Copy link
Contributor

locks commented Feb 4, 2022

This is known and intentional.

@locks locks closed this as completed Feb 4, 2022
@NullVoxPopuli
Copy link
Contributor

Could use a more descriptive error tho.

This bug report could actually be:

Error is incorrect for situation. Not directly actionable

@miguelcobain
Copy link
Contributor Author

I think showing a build time warning if welcome-page addon is used in production would be enough.
Some people came to me on discord asking if I found the solution.

herzzanu added a commit to herzzanu/embed-demo that referenced this issue Dec 2, 2022
styfle added a commit to vercel/vercel that referenced this issue Aug 15, 2023
note that the default welcome screen is borked in production

emberjs/ember.js#19912
styfle added a commit to vercel/vercel that referenced this issue Aug 15, 2023
This PR updates the ember example using the following:

```
npx ember new ember-quickstart --lang en
```

I also had to add `{ 'ember-welcome-page': { enabled: true } }` to the
build config because the `<WelcomePage>` only works in dev, but throws
when using the default build command:

```
ember build --environment=production
```

For posterity, the error looks like:
```
Uncaught TypeError: Cannot destructure property 'manager' of 'e' as it is null.
    at u.resolvedComponent (vendor-2e12520b7a71eead28708a24fafa7fbc.js:2094:28)
    at vendor-2e12520b7a71eead28708a24fafa7fbc.js:1999:5
    at ne (vendor-2e12520b7a71eead28708a24fafa7fbc.js:1999:30)
    at l (vendor-2e12520b7a71eead28708a24fafa7fbc.js:1991:18)
    at vendor-2e12520b7a71eead28708a24fafa7fbc.js:1981:836
    at _.compile (vendor-2e12520b7a71eead28708a24fafa7fbc.js:1938:173)
    at re (vendor-2e12520b7a71eead28708a24fafa7fbc.js:1991:61)
    at vendor-2e12520b7a71eead28708a24fafa7fbc.js:1988:30
    at ee.compile (vendor-2e12520b7a71eead28708a24fafa7fbc.js:1989:23)
    at Object.evaluate (vendor-2e12520b7a71eead28708a24fafa7fbc.js:2431:224)
```

- Related emberjs/ember.js#19912
- Related ember-cli/ember-welcome-page#385
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