question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No provider for TranslateService!

See original GitHub issue

we use electron, ng 5x and ngx-translate 10x we following the Step by step instructions (step 5 minimal Setup)

when we use the grid the following error occurs and we do not know how to fix it.

core.js:1448 ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[AngularSlickgridComponent -> TranslateService]: StaticInjectorError(Platform: core)[AngularSlickgridComponent -> TranslateService]: NullInjectorError: No provider for TranslateService! Error: StaticInjectorError(AppModule)[AngularSlickgridComponent -> TranslateService]: StaticInjectorError(Platform: core)[AngularSlickgridComponent -> TranslateService]: NullInjectorError: No provider for TranslateService! at _NullInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js._NullInjector.get (core.js:1002) at resolveToken (core.js:1300) at tryResolveToken (core.js:1242) at StaticInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js.StaticInjector.get (core.js:1110) at resolveToken (core.js:1300) at tryResolveToken (core.js:1242) at StaticInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js.StaticInjector.get (core.js:1110) at resolveNgModuleDep (core.js:10854) at _createClass (core.js:10891) at _createProviderInstance$1 (core.js:10865) at _NullInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js._NullInjector.get (core.js:1002) at resolveToken (core.js:1300) at tryResolveToken (core.js:1242) at StaticInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js.StaticInjector.get (core.js:1110) at resolveToken (core.js:1300) at tryResolveToken (core.js:1242) at StaticInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js.StaticInjector.get (core.js:1110) at resolveNgModuleDep (core.js:10854) at _createClass (core.js:10891) at _createProviderInstance$1 (core.js:10865) at resolvePromise (zone.js:809) at resolvePromise (zone.js:775) at zone.js:858 at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:4740) at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420) at Zone.webpackJsonp../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188) at drainMicroTaskQueue (zone.js:595) at <anonymous>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ghiscodingcommented, Apr 13, 2018

@harryhahn @vseyedzadeh I just encountered this problem, so I am able to reproduce it. So here’s the thing, my lib is tested with ngx-translate version 9.x.x but 2 weeks ago they released 10.x.x which has a breaking change

BREAKING CHANGES

core: The library is now compatible with Angular 6+ and RxJS 6+. If you need to use Angular 5, please stay on version 9.1.1. If you need to use RxJS 5, update to 5.6 and use the rxjs-compat library (see the RxJS update guide)

I also made a change lately to use any version of ngx-translate via >= as "@ngx-translate/core": ">=9.1.1", which is obviously bad considering the latest breaking change.

So the solution is the install previous version of ngx-translate, if you have (and you probably have) installed version 10.x.x please remove it and install it with

npm install @ngx-translate/core@9.1.1
npm install @ngx-translate/http-loader@2.0.0

or simply edit your package.json file, as I did, with these fixed versions

"dependencies": {
    "@ngx-translate/core": "^9.1.1",
    "@ngx-translate/http-loader": "^2.0.0",
}

I also update my lib to make sure it is the previous version used, my lib is now at version 0.16.4

Sorry about that guys, I was totally in the dark before I ran into the problem just now. Please give that a try and hopefully that works because I’m falling in vacation tomorrow

EDIT Update all the Wiki references as well. Please give it a try again

0reactions
coolrbcommented, Jun 26, 2019

@ghiscoding Thanks for your pointer. I finally decided to work angular-slickgrid. After changing the typescript to 3.x, everything worked. I have also created a public gist of how to set columns dynamically, context menu https://gist.github.com/coolrb/8e2fa6d4a19f54c11500aafbb87ceba1

Read more comments on GitHub >

github_iconTop Results From Across the Web

"No provider for TranslateService" error somehow connected ...
With my Angular+Webpack+JHipster+yarn project I get the following error. Then I delete node_modules and run 'npm install`, and it goes away.
Read more >
No provider for TranslateService! · Issue #1324 · ngx-translate ...
Current behavior I have an Angular Library, it import TranslateModule in some shared modules, and i use this library at my principal application...
Read more >
No provider for TranslateService! Error - ionic-v3
I am getting following error when trying to use TranslateSevice from 'ng2-translate'. Any suggestion... Error: Uncaught (in promise): Error: ...
Read more >
Angular testing-->No provider for TranslateStore!
Angular testing-->No provider for TranslateStore! ; 1. import {TranslateFakeLoader,TranslateLoader,TranslateModule,TranslateService } from '@ngx-translate/core';.
Read more >
[Solved]-No provider for TranslateService-angular.js
[Solved]-No provider for TranslateService-angular.js. Search. score:1. Make sure that you have added the snippet in imports block of app.module.ts for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found