I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
I set up a project using the Universal Support Starter. When I import my module that I set up using this angular-library-starter, I get the following error:
TypeError: ctor is not a constructor
at _createClass (/Users/mp945gl/Documents/sampleRcl/dist/server.js:10382:20)
at createProviderInstance$1 (/Users/mp945gl/Documents/sampleRcl/dist/server.js:10358:26)
at initNgModule (/Users/mp945gl/Documents/sampleRcl/dist/server.js:10311:28)
at new NgModuleRef (/Users/mp945gl/Documents/sampleRcl/dist/server.js:11408:9)
at Object.createNgModuleRef (/Users/mp945gl/Documents/sampleRcl/dist/server.js:11392:12)
at NgModuleFactory_.create (/Users/mp945gl/Documents/sampleRcl/dist/server.js:14685:25)
at /Users/mp945gl/Documents/sampleRcl/dist/server.js:5352:61
at ZoneDelegate.invoke (/Users/mp945gl/Documents/sampleRcl/dist/server.js:78123:26)
at Object.onInvoke (/Users/mp945gl/Documents/sampleRcl/dist/server.js:4745:33)
at ZoneDelegate.invoke (/Users/mp945gl/Documents/sampleRcl/dist/server.js:78122:32)
I am only exporting a one very simple component at the moment.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
Import this starter into the universal-support starter.
What is the expected behavior?
Angular-library-starter to work in Universal-starter.
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
This is my module.ts file:
// Core
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import {
RouterModule,
PreloadAllModules
} from '@angular/router';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
// Routes
import { ROUTES } from './my-custom.routes';
// Components
import { AccordionHeaderComponent } from './components/accordion/accordion-header/accordion-header.component';
import { MyCustomService } from './my-custom.service';
In my index.ts:
`export { RclExcaliburModule } from './module';`
... Everything else aligns with this angular-library-starter and the universal-starter
Node: v6.11.0
My Angular-library-starter:
- Angular version: 4.3.1
My Demo Site with Universal Support:
- Angular version: 4.4.6
- Browser: ALL
* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
This is the only issue I can find in stackoverflow with the same error: https://stackoverflow.com/questions/44597532/angular-4-unit-testing-error-typeerror-ctor-is-not-a-constructor
Am I missing something obvious? Thanks in advance.
Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass
I'm submitting a ... [x] bug report [ ] feature request [ ] question about the decisions made in the repository
Do you want to request a feature or report a bug? Report a bug
What is the current behavior? I set up a project using the Universal Support Starter. When I import my module that I set up using this angular-library-starter, I get the following error:
TypeError: ctor is not a constructor at _createClass (/Users/mp945gl/Documents/sampleRcl/dist/server.js:10382:20) at createProviderInstance$1 (/Users/mp945gl/Documents/sampleRcl/dist/server.js:10358:26) at initNgModule (/Users/mp945gl/Documents/sampleRcl/dist/server.js:10311:28) at new NgModuleRef (/Users/mp945gl/Documents/sampleRcl/dist/server.js:11408:9) at Object.createNgModuleRef (/Users/mp945gl/Documents/sampleRcl/dist/server.js:11392:12) at NgModuleFactory_.create (/Users/mp945gl/Documents/sampleRcl/dist/server.js:14685:25) at /Users/mp945gl/Documents/sampleRcl/dist/server.js:5352:61 at ZoneDelegate.invoke (/Users/mp945gl/Documents/sampleRcl/dist/server.js:78123:26) at Object.onInvoke (/Users/mp945gl/Documents/sampleRcl/dist/server.js:4745:33) at ZoneDelegate.invoke (/Users/mp945gl/Documents/sampleRcl/dist/server.js:78122:32)
I am only exporting a one very simple component at the moment.
Import this starter into the universal-support starter.
What is the expected behavior? Angular-library-starter to work in Universal-starter.
What is the motivation / use case for changing the behavior?
Please tell us about your environment: This is my module.ts file:
// Routes import { ROUTES } from './my-custom.routes';
// Components import { AccordionHeaderComponent } from './components/accordion/accordion-header/accordion-header.component'; import { MyCustomService } from './my-custom.service';
@NgModule({ declarations: [ AccordionHeaderComponent, ], imports: [ CommonModule, FormsModule, ReactiveFormsModule, RouterModule.forRoot(ROUTES, { useHash: true, preloadingStrategy: PreloadAllModules }), BrowserAnimationsModule ], exports: [ AccordionHeaderComponent ], providers: [ MyCustomService ], schemas: [ CUSTOM_ELEMENTS_SCHEMA ] }) export class MyCustomModule {}