[Bug] Injecting Ember Data Store to Avoid Implicit Injection is Broken
See original GitHub issue🐞 Describe the Bug
In advance of implicit injections of the Ember Data’s Store being removed we’ve been refactoring to explicit injections of the store when we need it. As of Ember v3.28.7 we’re seeing errors to this effect:
this.store.findAll is not a function
Note that this is not unique to findAll
— any method on Store will fail.
🔬 Minimal Reproduction
- Clone https://github.com/jherdman/ember-data-store-sadness
npm install && npm start
- Visit
http://localhost:4200
- Open your dev console, see error
😕 Actual Behavior
Page does not load, an error is raised as described above.
🤔 Expected Behavior
- No deprecation warning is raised
- Store works as expected
🌍 Environment
- Ember: - 3.28.7
- Node.js/npm: - v16.13.0
- OS: - macOS 12.0.1
- Browser: - Firefox 94.0.2
➕ Additional Context
Bug does not occur in Ember v3.28.6
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Implicit Injection Deprecation - Ember RFCs
This RFC seeks to deprecate implicit injections on arbitrary Ember Framework objects. This is commonly done via owner.inject in an intializer or ...
Read more >@ember-data/store | Yarn - Package Manager
Provides the Store service which coordinates the cache with the network and ... EmberData. The lightweight reactive data library for JavaScript applications.
Read more >eslint-plugin-ember - npm
ESLint plugin for Ember.js apps. Latest version: 11.3.1, last published: 6 days ago. Start using eslint-plugin-ember in your project by ...
Read more >ember error this.store.findAll is not a function - Stack Overflow
The reason why you see it is that starting from the v4 Ember doesn't allow some implicit service injections which were there up...
Read more >[Solved]-ember error this.store.findAll is not a function-ember.js
The reason why you see it is that starting from the v4 Ember doesn't allow some implicit service injections which were there up...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
3.28.8 is out which should address this bug. Thank you for the excellent write up and reproduction @jherdman, they really helped focus the conversation! 🍻
Thanks so much for working through this @mixonic 🎉 It’s working exactly as it should now 😍