Ember Canary: Cannot read property 'start' of undefined
jherdman opened this issue Β· comments
I'm seeing the following error when building against Ember Canary:
Template Compiler Error (TemplateCompiler) in ember-basic-dropdown/templates/components/basic-dropdown-content.hbs
Cannot read property 'start' of undefined
Contents of the log file:
ERROR Summary:
- broccoliBuilderErrorStack: TypeError: Cannot read property 'start' of undefined
at Source.spanFor (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:8013:26)
at BlockContext.loc (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:12810:26)
at ElementNormalizer.ElementNode (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13189:29)
at StatementNormalizer.normalize (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13047:52)
at /home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13214:27
at Array.map (<anonymous>)
at ElementNormalizer.ElementNode (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13213:41)
at StatementNormalizer.normalize (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13047:52)
at /home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13148:27
at Array.map (<anonymous>)
at StatementNormalizer.Block (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13147:61)
at StatementNormalizer.BlockStatement (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13136:23)
at StatementNormalizer.normalize (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13044:23)
at /home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:12783:25
at Array.map (<anonymous>)
at normalize (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:12782:62)
- code: [undefined]
- codeFrame: Cannot read property 'start' of undefined
- errorMessage: ember-basic-dropdown/templates/components/basic-dropdown-content.hbs: Cannot read property 'start' of undefined
in /run/user/1000/broccoli-120533pyvyQF6CFynn/out-204-colocated_template_processor
at TemplateCompiler
- errorType: Template Compiler Error
- location:
- column: [undefined]
- file: ember-basic-dropdown/templates/components/basic-dropdown-content.hbs
- line: [undefined]
- treeDir: /run/user/1000/broccoli-120533pyvyQF6CFynn/out-204-colocated_template_processor
- message: ember-basic-dropdown/templates/components/basic-dropdown-content.hbs: Cannot read property 'start' of undefined
in /run/user/1000/broccoli-120533pyvyQF6CFynn/out-204-colocated_template_processor
at TemplateCompiler
- name: Error
- nodeAnnotation: [undefined]
- nodeName: TemplateCompiler
- originalErrorMessage: Cannot read property 'start' of undefined
- stack: TypeError: Cannot read property 'start' of undefined
at Source.spanFor (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:8013:26)
at BlockContext.loc (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:12810:26)
at ElementNormalizer.ElementNode (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13189:29)
at StatementNormalizer.normalize (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13047:52)
at /home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13214:27
at Array.map (<anonymous>)
at ElementNormalizer.ElementNode (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13213:41)
at StatementNormalizer.normalize (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13047:52)
at /home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13148:27
at Array.map (<anonymous>)
at StatementNormalizer.Block (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13147:61)
at StatementNormalizer.BlockStatement (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13136:23)
at StatementNormalizer.normalize (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:13044:23)
at /home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:12783:25
at Array.map (<anonymous>)
at normalize (/home/james/DEV/PN/fullscreen-card-renderer/node_modules/ember-source/dist/ember-template-compiler.js:12782:62)
Looking at the related PR, this should be fixed, can you confirm?
Assuming that this change has landed in Ember Canary, sadly, no... I'll try again in a few days to see what happens.
FYI tried again today and still no luck.
I just realized I'm having a bit of a brain fart on the matter. I'm using this addon via ember-power-calednar. I'll put together a PR to update that addon and go from there.
I'm receiving a similar error with Ember 3.25.0
except it's complaining about type
instead of start
.
Template Compiler Error (broccoli-persistent-filter:TemplateCompiler) in ember-basic-dropdown/templates/components/basic-dropdown-content.hbs
Cannot read property 'type' of undefined
Stack Trace and Error Report: /var/folders/_8/c8x5jpjn3m128c2k47kwrr8h0000gn/T/error.dump.3db35b8594d4b728eb37249ef57933fc.log
@csprocket777 what version of ember-basic-dropdown and ember-maybe-in-element do you have? I think you need at least 3.0.8 so that you get e89a00e
@jamescdavis I'm using ember-power-select
which has a dependency on 3.0.11
of ember-basic-dropdown
. Do I need to include ember-maybe-in-element
separately? In my node-modules
folder it's including 3.0.12
of ember-basic-dropdown
You shouldn't have to (it's already a dep of ember-basic-dropdown
). It's possible something regressed since glimmerjs/glimmer-vm#1204
π€ ember try:one ember-release
fails for me locally. AFAICT CI is not actually running for this repo.
@jamescdavis Well right now my build isn't completing and I'm stuck here:
Template Compiler Error (broccoli-persistent-filter:TemplateCompiler) in ember-basic-dropdown/templates/components/basic-dropdown-content.hbs
Cannot read property 'type' of undefined
Stack Trace and Error Report: /var/folders/_8/c8x5jpjn3m128c2k47kwrr8h0000gn/T/error.dump.a3fd85eb2dcb765a630106a34740190d.log
(node:3650) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'type' of undefined
at BlockContext.isFreeVar (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14150:25)
at BlockContext.isFreeVar (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14156:21)
at BlockContext.resolutionFor (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14127:16)
at StatementNormalizer.BlockStatement (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14441:35)
at StatementNormalizer.normalize (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14358:23)
at /Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14462:27
at Array.map (<anonymous>)
at StatementNormalizer.Block (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14461:61)
at StatementNormalizer.BlockStatement (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14450:23)
at StatementNormalizer.normalize (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14358:23)
at /Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14462:27
at Array.map (<anonymous>)
at StatementNormalizer.Block (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14461:61)
at StatementNormalizer.BlockStatement (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14451:33)
at StatementNormalizer.normalize (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14358:23)
at /Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14528:27
at Array.map (<anonymous>)
at ElementNormalizer.ElementNode (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14527:41)
at StatementNormalizer.normalize (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14361:52)
at /Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14462:27
at Array.map (<anonymous>)
at StatementNormalizer.Block (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14461:61)
at StatementNormalizer.BlockStatement (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14450:23)
at StatementNormalizer.normalize (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14358:23)
at /Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14088:25
at Array.map (<anonymous>)
at normalize (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:14087:67)
at precompileJSON (/Users/[obscured]/Documents/[obscured, ember-project-path]/node_modules/ember-source/dist/ember-template-compiler.js:6070:44)
(Use `node --trace-warnings ...` to show where the warning was created)
I am seeing the same, but with ember-basic-dropdown 1.x (can't upgrade to latest because our app is on Ember 3.12 and can't upgrade just yet).
Ok, there was some issue with ember-font-awesome
in the test suite. I removed it and the {{fa-icon}}
invocations in tests and the test suite builds and runs on ember-release (3.25). One test does fail, but I'm not getting the build errors. Not sure what's going on here...
I actually removed ember-font-awesome
just recently in favor of @fortawesome/ember-fontawesome
.... I can't remove this or it's usage in my app.
Ok I've solved my specific issue. @jamescdavis, you're right, the latest versions of the ember-power-select
and ember-basic-dropdown
components do come with the proper versions of ember-maybe-in-element
. Even explicitly including the proper version in my package.json
didn't resolve it for me.
So I decided to check which versions were being used in my project:
npm ls ember-maybe-in-element
βββ ember-maybe-in-element@2.0.1
βββ¬ ember-power-select@4.0.6
β βββ¬ ember-basic-dropdown@3.0.12
β βββ ember-maybe-in-element@2.0.1 deduped
βββ¬ ember-power-select-typeahead@0.8.1
βββ¬ ember-power-select@3.0.6
βββ¬ ember-basic-dropdown@2.0.15
βββ ember-maybe-in-element@0.4.0
Notice ember-power-select-typeahead
is using the old-n-busted version.
So I added a resolution to my package.json file and it ensured I was using the proper version across the all the addons. My compile no longer complains about this particular issue.
Sorry for neglecting this for so long, I'm super busy and try to concentrate my OS work on Fridays. Glad @csprocket777 found the issue.
I'm going to migrate to github actions to fix CI.
Ok, it took a while but I've setup github actions and fixed the test suite for beta and canary.
It turns out I had @embroider/util
pinned to an old version and that was the source of some of the failures. I've released a new patch version in which I allow that dependency to float.
Perhaps that fixes the problems some of you have experienced?
Thank you for taking the time to get CI going again, @cibernox!
I'm experiencing the same issue
Cannot read property 'type' of undefined
when building with:
ember-power-select 3.0.4
ember 3.26
'type' of undefined
issue fixed in cibernox/ember-power-select-typeahead#114 - published to 0.8.2 for those running into this issue with typeahead