-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Misleading error on 3.15 migration #18640
Comments
A bit of background here, the assertion in question was added in #14554. That fix assumes that the only reason that this may error is that you haven't supplied enough dynamic params (and the reason we augment the error message is that you need to know the target route). I think the right fix here would be to update this ember.js/packages/@ember/-internals/glimmer/lib/components/link-to.ts Lines 770 to 777 in d1ad76a
To either:
|
Yup, just had the same issue in 3.18, thanks for posting this, made it easy to see past the generate link bit to the real issue of @action decorator in my case being the same name as another. |
In my case it was duplicate action names |
This fixes emberjs#18640.
During my Octane migration adventures I stumbled upon this error:
I got confused on the first part of "generating link", but the main problem is in the "@action decorator". Once I solved this, the error on "cashbook route" went away.
I believe there are two ways to improve the DX:
LinkTo
component?) once it catches some exception it wrongly assumes that themodels
were not provided.@action
would give me a hint about the file that was incorrect, I would find the source of the problem much quicker.Foot note for whoever might suffer from the same issue: I happened to have
action
andtask
(from ember-concurrency) defined in one controller with the same names. After runningnpx ember-native-class-codemod http://localhost:4200 ./app
codemod, their names collided in the class-level namespace.The text was updated successfully, but these errors were encountered: