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

ember-cli deprecation warning: overriding init without calling this.super #128

Closed
jming422 opened this issue Jun 20, 2016 · 6 comments · Fixed by #131
Closed

ember-cli deprecation warning: overriding init without calling this.super #128

jming422 opened this issue Jun 20, 2016 · 6 comments · Fixed by #131

Comments

@jming422
Copy link

On a fresh project created with ember-cli, after doing ember install ember-pouch, this deprecation warning appears:

DEPRECATION: Overriding init without calling this._super is deprecated. Please call `this._super.init && this._super.init.apply(this, arguments);` addon: `ember-pouch`
    at Function.Addon.lookup (/path/to/project/node_modules/ember-cli/lib/models/addon.js:896:27)

If you look at ember-cli/core-object/pull/37 you'll see an updated wording of this warning which I found much more clear:

The addon `ember-pouch` is overriding init without calling this._super. 
          This behaviour is deprecated. 
          This means that addon's author needs to update it calling `this._super.init && this._super.init.apply(this, arguments)` 
          and release a new version. 
          Do not worry, ember-cli is working normally.

ember-pouch still functions the same in every other way, but it's a bit annoying to see that warning every time I use any ember-cli command.

@fredguth
Copy link

I have the same issue. I am not sure, but I think this prevents me to generate pouch-model:

$ ember g pouch-model mymodel
DEPRECATION: Overriding init without calling this._super is deprecated. Please call `this._super.init && this._super.init.apply(this, arguments);` addon: `ember-pouch`
    at Function.Addon.lookup (/Users/fredguth/Code/julia/node_modules/ember-cli/lib/models/addon.js:896:27)
Cannot find module 'ember-cli/blueprints/model'
Error: Cannot find module 'ember-cli/blueprints/model'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/fredguth/Code/julia/node_modules/ember-pouch/blueprints/pouch-model/index.js:1:92)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

@fsmanuel
Copy link
Collaborator

@fredguth I'm not sure if the deprecation is responsible for your problem. Seems like Error: Cannot find module 'ember-cli/blueprints/model' is the cause for it. I think I remember that something with the blueprints in ember-cli has changed. They no longer maintain them and moved them into ember-data.

@fsmanuel
Copy link
Collaborator

@mattmarcum or @backspace is one of you up to date with the changes in ember-cli and ember-data?
Maybe we just have to change that line:

// from
var EmberCliModelBlueprint = require('ember-cli/blueprints/model');
// to
var EmberCliModelBlueprint = require('ember-data/blueprints/model');

@nolanlawson
Copy link
Member

fixed in #129, thanks @fsmanuel

@fredguth
Copy link

thanks @fsmanuel and @nolanlawson

@fsmanuel
Copy link
Collaborator

@fredguth if your problem still exists you should open a new issue for the blueprint fix

backspace added a commit to backspace/ember-pouch that referenced this issue Jun 21, 2016
backspace added a commit to backspace/ember-pouch that referenced this issue Jun 21, 2016
simonexmachina pushed a commit to simonexmachina/ember-pouch that referenced this issue Sep 23, 2016
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

Successfully merging a pull request may close this issue.

4 participants