Open nlko opened 7 years ago
having the same issue, any news ?
Hi @nlko and @vchuquimia,
Try to update your config file such that:
map: {
'ng2-slim-loading-bar': 'npm:ng2-slim-loading-bar'
},
packages: {
'ng2-slim-loading-bar': { defaultExtension: 'js' },
}
Let me know if it fixes your issue?
I also get an error using v2.0.5 (2.0.7 too) and angular-cli last version (beta.24). It was working fine with v2.0.4 and angular-cli beta.22-1 which was the last version that allowed non-AoT compatible libraries.
Inspecting the index.d.ts
file in the npm package I see a lambda in the providers, which is not allowed in AoT (see https://github.com/rangle/angular-2-aot-sandbox#func-in-providers-usefactory-top)
index.d.ts
import { ModuleWithProviders } from "@angular/core";
import { SlimLoadingBarService } from './src/slim-loading-bar.service';
export * from './src/slim-loading-bar.component';
export * from './src/slim-loading-bar.service';
export declare let providers: {
provide: typeof SlimLoadingBarService;
useFactory: () => SlimLoadingBarService; // <-- HERE
}[];
export declare class SlimLoadingBarModule {
static forRoot(): ModuleWithProviders;
}
@akserg Checking index.ts
in master it looks like an older version of declaration files were being published, but I might be wrong. Can you check please?
EDIT: nevermind. I have a wrapper module and the problem was that the way of providing the loading bar service changed and I was getting "No provider for EventEmmiter". Working fine for me now.
Hi @cacogr
Can you please delete node_modules and reinstall them again via the npm install
command. After that please try to run server.
Hello,
I'm submitting a ... (check one with "x")
Current behavior
My angular2 project is using ng2-slim-loading-bar and as such it is referenced in package.json and systemjs config file and other ts files.
I tried to upgrade from 2.0.4 to 2.0.5 (using npm) and I had some issues in firefox and chrome (see below). I've no need for switching to 2.0.5 for now so I'll stay to 2.0.4 but tell me if I can be of any help.
Error message in the firefox console :
Chrome console has a similar error :
Some people tend to say that this error could come from systemjs so here is my config
Expected/desired behavior
Same as in 2.0.4
Reproduction of the problem
Difficult to say, maybe specificaly linked to my project but I don't think I'm using it in a border line way.
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
ng2-translate version: nope
Angular version: 2.0.0
Browser: Chrome 55 | Firefox 50
Language: TypeScript 2 transpiled to ES5