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

Uncaught TypeError: app.inject is not a function #9

Open
jzisser9 opened this issue Jan 21, 2024 · 3 comments
Open

Uncaught TypeError: app.inject is not a function #9

jzisser9 opened this issue Jan 21, 2024 · 3 comments

Comments

@jzisser9
Copy link

Hello, I am attempting to use your google analytics plugin in my Ember 5.4.1 application. I've gone through the setup instructions (here)[https://github.com/onehilltech/ember-cli-google/blob/master/packages/ember-cli-google-analytics/README.md], but when I start my app and attempt to visit it in a browser, I get the error listed in the title. The line where the error occurs appears to be addon/initializers/g-analytics.js:8.

Can you advise what the cause of the issue is and what to do to resolve it? Could it be that the plugin is just out of date?

@hilljh82
Copy link
Contributor

@jzisser9 As you can see we have not updated this add-on to the latest version. Let me do an update and see if I can reproduce the problem, and then put in a solution. I wonder if there is some other services/dependencies not being loaded.

@hilljh82
Copy link
Contributor

@jzisser9 UPDATE: I was able to reproduce the error on 5.5. I am not seeing the error on 4.x.

@hilljh82
Copy link
Contributor

hilljh82 commented Jan 30, 2024

@jzisser9 I have updated the add-on (ver 2.0.2) and the documentation. The problem was that implicit injection was deprecated in Ember 4, and removed in Ember 5.

Please see the README for the additional steps needs to use this add-on in your Ember 5 application.

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

No branches or pull requests

2 participants