Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

cannot be used within addons: Cannot read property 'env' of undefined #103

Open
jonathanong opened this issue Aug 21, 2017 · 0 comments · May be fixed by #104
Open

cannot be used within addons: Cannot read property 'env' of undefined #103

jonathanong opened this issue Aug 21, 2017 · 0 comments · May be fixed by #104

Comments

@jonathanong
Copy link

Cannot read property 'env' of undefined
TypeError: Cannot read property 'env' of undefined
    at Class.included (/home/circleci/code/node_modules/ember-cli-rollbar/index.js:13:46)
    at addons.map.addon (/home/circleci/code/node_modules/ember-cli/lib/models/addon.js:383:34)
    at Array.map (<anonymous>)
    at Class.eachAddonInvoke (/home/circleci/code/node_modules/ember-cli/lib/models/addon.js:381:24)
    at Class.included (/home/circleci/code/node_modules/ember-cli/lib/models/addon.js:652:10)
    at Class.superWrapper [as included] (/home/circleci/code/node_modules/core-object/lib/assign-properties.js:34:20)
    at EmberAddon.<anonymous> (/home/circleci/code/node_modules/ember-cli/lib/broccoli/ember-app.js:527:17)
    at Array.filter (<anonymous>)
    at EmberAddon._notifyAddonIncluded (/home/circleci/code/node_modules/ember-cli/lib/broccoli/ember-app.js:524:47)
    at EmberAddon.EmberApp (/home/circleci/code/node_modules/ember-cli/lib/broccoli/ember-app.js:144:10)

seems like you should be using app instead of this.app

https://github.com/davewasmer/ember-cli-rollbar/blob/master/index.js#L13
https://github.com/damiencaselli/ember-cli-sentry/blob/master/index.js#L17
ember-cli/ember-cli#3718

@jonathanong jonathanong changed the title cannot be used with addons: Cannot read property 'env' of undefined cannot be used within addons: Cannot read property 'env' of undefined Aug 21, 2017
@jonathanong jonathanong linked a pull request Aug 21, 2017 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant