Comments (11)
You should not be calling super.constructor()
, you should be calling super()
. Unsure if that's what's causing the issue.
from ember-classic-decorator.
You should not be calling super.constructor(), you should be calling super(). Unsure if that's what's causing the issue.
Sorry - that was just a mistake in the example, I've edited the post to fix that.
from ember-classic-decorator.
@pzuraq This is now a more annoying problem, and I'm not totally sure what to do about it. It's not a "debug only" problem anymore
I have some native class adapters, that don't use or need the classic decorator. They also don't have any constructor hooks or anything. They extend JSONAPIAdapter. It looks like ember-data's base adapter now extends from EmberObject, so I end up with error messages like this;
from ember-classic-decorator.
It seems that removing the name from a class works for some reason that I don't understand, which is a little concerning..
errors
// some-adapter.js
import JSONAPIAdapter from '@ember-data/adapter/json-api'
export default class SomeAdapter extends JSONAPIAdapter {}
works
// some-adapter.js
import JSONAPIAdapter from '@ember-data/adapter/json-api'
export default class extends JSONAPIAdapter {}
from ember-classic-decorator.
This library is meant to be transitional, you should work to remove it from your codebase and convert asap. I'm not longer maintaining it as I don't have the time and most people have already worked through the transition.
from ember-classic-decorator.
No worries. I realise I'm a little behind in some transitional work in my codebases (though, we are on Ember 3.28 LTS, and I was under the impression that this addon would attempt to facilitate classic classes up until 4.0)
I'm not sure what the implications are of using native classes for adapters and serializers that extend from from ember-data's that are now based on EmberObject. Hopefully nothing major and I can safely ignore these errors.... (though It's unfortunate that I cannot actually turn them off)
I'll apply my above workaround of removing the class name, which I am guessing is a bug that allows a class to skip ember-classic-decorator's checks, and sit tight to see if anyone else hits this issue.
I appreciate your time in reading my comments!
from ember-classic-decorator.
Another workaround we have found is to pin ember-classic-decorator
to 2.0.0 as a yarn resolution. 2.0.1 seems to bring the problems back. This is a suitable workable solution for now 👍
from ember-classic-decorator.
Still an issue on ember-classic-decorator v3.0.1 - was hoping the updates would fix it.
Remaining locked to v2 for now
from ember-classic-decorator.
@Techn1x We are facing the same issue, but locking the ember-classic-decorator to 2.0.0 also did not help. we are using 3.28.11 version of ember-data. can you let me know the version of ember-data for which locking ember-classic-decorator to 2.0.0 fixed the issue?
from ember-classic-decorator.
Sorry! This was a while ago, so I am not sure. It is likely we were using ember-data 3.28 at the time as well.
from ember-classic-decorator.
Sorry! This was a while ago, so I am not sure. It is likely we were using ember-data 3.28 at the time as well.
ohh.. okay thanks
from ember-classic-decorator.
Related Issues (20)
- Installing `ember-classic-decorator` "breaks" the `@ember/string` deprecation warning HOT 1
- Not working on Ember 5 HOT 5
- Embroider incompatibility HOT 3
- Observer conversion HOT 2
- Non-default resolver can cause bugs
- Install error _1.MacrosConfig.astPlugins is not a function HOT 1
- Conflicting versions of `@embroider/macros` with `ember-exam`
- Use of global require can cause conflicts with 3rd party AMD-based scripts
- Deprecation warnings with Ember 3.27 HOT 4
- Breaks if user is shadowing `window`
- Does not work with `ember-cli-deprecation-workflow` v2 HOT 1
- Ember-data classes no longer recognized on Ember 3.27 or later HOT 3
- Incremental adoption
- ember-concurrency task lint error
- Generates broken code in production HOT 2
- JSONAPISerializer error when following 4.1 docs HOT 6
- Can't inherit models HOT 2
- ESLint rules totally broken on TypeScript 4.8.2 HOT 1
- `isTesting` from `@embroider/macros` returns false in tests if `ember-classic-decorator` is a devDependency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-classic-decorator.