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] 5.6: ember-template-compiler cannot used Application.initializer, as it could not be a function, and also: <...>.Test is undefined #20640

Open
NullVoxPopuli opened this issue Feb 4, 2024 · 4 comments

Comments

@NullVoxPopuli
Copy link
Sponsor Contributor

NullVoxPopuli commented Feb 4, 2024

🐞 Describe the Bug

A clear and concise description of what the bug is.

image

😕 Actual Behavior

error

🤔 Expected Behavior

template-compiler loads at runitme.

(I know this'll be fixed by the new runtime compiler, but that isn't available yet, so folks needing to use runtime compilation must stay on, at newest, ember-source 5.5)

🌍 Environment

  • Ember: - 5.6

➕ Additional Context

Loaded via: ember-cli-build.js (with embroider / webpack)

  // Adds:
  //  - ember-template-compiler
  //  - @glimmer/syntax
  app.import('vendor/ember/ember-template-compiler.js');
    staticAddonTrees: true,
    staticAddonTestSupportTrees: true,
    staticHelpers: true,
    staticModifiers: true,
    staticComponents: true,
    staticEmberSource: true,
    staticAppPaths: ['utils'],
@NullVoxPopuli
Copy link
Sponsor Contributor Author

this is resolved if statkcEmberSource is turned off

@boris-petrov
Copy link
Contributor

So this is a problem only under Embroider? I didn't see such an issue in my case using ember-cli.

@NullVoxPopuli
Copy link
Sponsor Contributor Author

NullVoxPopuli commented Feb 12, 2024

yeah, older ember-cli ships everything in node_modules, and there is no staticEmberSource option 😅

@NullVoxPopuli
Copy link
Sponsor Contributor Author

Looks like this happens for tests, too:

Uncaught TypeError: ember__WEBPACK_IMPORTED_MODULE_6__.default.Test is undefined
    setupTestAdapter index.js:123
    start index.js:203
    js test-helper.js:13
    Webpack 7
[index.js:123:36](webpack://docs-app/src/index.js)
Uncaught Error: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js".

@NullVoxPopuli NullVoxPopuli changed the title [Bug] 5.6: ember-template-compiler cannot used Application.initializer, as it could not be a function [Bug] 5.6: ember-template-compiler cannot used Application.initializer, as it could not be a function, and also: <...>.Test is undefined Feb 13, 2024
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

2 participants