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

{{unique-id}} helper is broken in 3.4.8 #1889

Open
jknight12882 opened this issue Apr 23, 2024 · 8 comments
Open

{{unique-id}} helper is broken in 3.4.8 #1889

jknight12882 opened this issue Apr 23, 2024 · 8 comments

Comments

@jknight12882
Copy link

Looks related to the changes made in @embroider/compat@3.4.7. Throws the following error when rendering a template with the {{unique-id}} helper

manager.js:394 Uncaught (in promise) Error: Attempted to use a value as a helper, but it was not an object or function. Helper definitions must be objects or functions with an associated helper manager. The value was: undefined
    at getInternalHelperManager (manager.js:394:1)
    at ConstantsImpl.helper (program.js:95:1)
    at resolveHelper (opcode-compiler.js:207:1)
    at encodeOp (opcode-compiler.js:1976:1)
    at pushOp (opcode-compiler.js:1911:1)
    at opcode-compiler.js:420:1
    at Compilers.compile (opcode-compiler.js:405:1)
    at expr (opcode-compiler.js:553:1)
    at CompilePositional (opcode-compiler.js:622:1)
    at opcode-compiler.js:1833:1
    at Compilers.compile (opcode-compiler.js:405:1)
    at compileStatements (opcode-compiler.js:1914:1)
    at maybeCompile (opcode-compiler.js:1896:1)
    at CompilableTemplateImpl.compile (opcode-compiler.js:1879:1)
    at VM.compile (runtime.js:4678:1)
    at Object.evaluate (runtime.js:1930:1)
    at AppendOpcodes.evaluate (runtime.js:1033:1)
    at LowLevelVM.evaluateSyscall (runtime.js:4109:1)
    at LowLevelVM.evaluateInner (runtime.js:4080:1)
    at LowLevelVM.evaluateOuter (runtime.js:4073:1)
    at VM.next (runtime.js:4871:1)
    at VM._execute (runtime.js:4858:1)
    at VM.execute (runtime.js:4833:1)
    at runtime.js:4916:1
    at runInTrackingTransaction (validator.js:133:1)
    at TemplateIteratorImpl.sync (runtime.js:4916:1)
    at index.js:4684:1
    at RootState.render (index.js:4653:1)
    at index.js:4943:1
    at inTransaction (runtime.js:3985:1)
    at Renderer._renderRoots (index.js:4925:1)
    at Renderer._renderRootsTransaction (index.js:4969:1)
    at Renderer._renderRoot (index.js:4914:1)
    at Renderer._appendDefinition (index.js:4839:1)
    at Renderer.appendOutletView (index.js:4829:1)
    at invoke (backburner.js:272:1)
    at Queue.flush (backburner.js:188:1)
    at DeferredActionQueues.flush (backburner.js:342:1)
    at Backburner._end (backburner.js:770:1)
    at Backburner._boundAutorunEnd (backburner.js:507:1)
@void-mAlex
Copy link
Collaborator

hello @jknight12882
what version of ember source are you on?

@jknight12882
Copy link
Author

4.12.4

@void-mAlex
Copy link
Collaborator

thank you, that version should already have the built in unique-id helper
is it a public app by any chance?

do you have the polyfill instealled?
which options are you using for embroider (specifically asking about staticModifiers and staticHelpers) but all are informative

are you using gjs/gts files? what is being rendered route template/components?

@jknight12882
Copy link
Author

jknight12882 commented Apr 23, 2024

Unfortunately not a public app. Works fine with @embroider/compat@3.4.6. Not using gjs/gts. Using the following config

return require('@embroider/compat').compatBuild(app, Webpack, {
    staticAddonTestSupportTrees: true,
    staticAddonTrees: true,
    staticHelpers: true,
    staticModifiers: true,
    staticComponents: true,
    packagerOptions: {
      publicAssetURL: '<redacted>',

      webpackConfig: {
        devtool: 'source-map',
      },
    },
  });

@jknight12882
Copy link
Author

Also, not using the polyfill, using the ember-provided helper

@jknight12882
Copy link
Author

Also, we are using colocated components with the .js and .hbs file in the same /components folder

@jknight12882
Copy link
Author

following up on this as 3.4.9 still seems to be affected by this issue so we are having to pin @embroider/compat at 3.4.6

@esbanarango
Copy link

Same issue here: "@embroider/compat": "3.5.0"

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