These are chat archives for systemjs/systemjs

6th
Jul 2017
Shiv Kushwaha
@kushwahashiv
Jul 06 2017 07:01
Hi
I'm getting following error
console Unhandled Promise rejection: (SystemJS) Can't resolve all parameters for ViewImpl: (?, ?). Error: Can't resolve all parameters for ViewImpl: (?, ?). at syntaxError (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:1550:34) at CompileMetadataResolver._getDependenciesMetadata (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:14887:35) at CompileMetadataResolver._getTypeMetadata (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:14755:26) at CompileMetadataResolver._getInjectableMetadata (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:14741:21) at CompileMetadataResolver.getProviderMetadata (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:15031:40) at eval (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:14960:49) at Array.forEach (native) at CompileMetadataResolver._getProvidersMetadata (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:14921:19) at CompileMetadataResolver.getNgModuleMetadata (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:14576:50) at CompileMetadataResolver.getNgModuleSummary (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:14429:52) at eval (http://localhost:4200/node_modules/@angular/compiler/bundles/compiler.umd.js:14521:68) Evaluating http://localhost:4200/main.js Error loading http://localhost:4200/main.js ; Zone: <root> ; Task: Promise.then ; Value: Error: (SystemJS) Can't resolve all parameters for ViewImpl: (?, ?). Error: Can't resolve all parameters for ViewImpl: (?, ?).
Shiv Kushwaha
@kushwahashiv
Jul 06 2017 13:29
??
console Unhandled Promise rejection: (SystemJS) Can't resolve all parameters for ViewImpl: (?, ?). Error: Can't resolve all parameters for ViewImpl: (?, ?). at syntaxError
what this meaning?
Miloš Lapiš
@mlc-mlapis
Jul 06 2017 13:35
@kushwahashiv ... something in the template is not correctly called ... probably wrong syntax. What version of Angular is used?
Shiv Kushwaha
@kushwahashiv
Jul 06 2017 13:50
@angular version used ~4.1.0
@mlc-mlapis I'm using rollupjs for creating the publishable bundle very much similar to material https://github.com/angular/material2 infrastructure
I am writing a module with service a ViewImpl .
and using above service in a demo sample
very much like material 2 demo sample
Miloš Lapiš
@mlc-mlapis
Jul 06 2017 13:54
@kushwahashiv ... ah, so ViewImpl is a service? ... what about its constructor?
Shiv Kushwaha
@kushwahashiv
Jul 06 2017 13:56

@Injectable()
export class ViewImpl implements View {
    constructor(id: string, viewType: ViewType) {
        this.id = id;
        this.viewType = viewType;
    }
}
where View is an interface
Miloš Lapiš
@mlc-mlapis
Jul 06 2017 14:18
@kushwahashiv ... hmm, it looks that ViewImpl is instantiated but without id and viewType. How the service is used in the app?
Shiv Kushwaha
@kushwahashiv
Jul 06 2017 14:51
@mlc-mlapis service is exported from module and included in demo-app main module to use it
or in test cases I'm using
beforeEach(() => view = new ViewImpl('layout', ViewType.LAYOUT));
ViewType is an enum
seems it more related to configuration of systemjs
Miloš Lapiš
@mlc-mlapis
Jul 06 2017 14:59
@kushwahashiv ... is the problem in a bundled version or non-bundle or both?
Shiv Kushwaha
@kushwahashiv
Jul 06 2017 15:09
@mlc-mlapis there is issue in non-bundle. it is able to create a bundle not sure that would work as I haven't checked it so far
when I run a demo-app with uses of above service I get above mentioned error
in browser console
Miloš Lapiš
@mlc-mlapis
Jul 06 2017 16:19
@kushwahashiv ... hmm, OK but I can't still imagine how a configuration of SystemJS can create an error like above.
Patricio Ferreira
@kuakman
Jul 06 2017 16:57
does anyone have any luck generating coverage reports by using karma & karma-systemjs plugin and typescript?
Patricio Ferreira
@kuakman
Jul 06 2017 23:32
nevermind, I got it working ;)