I had this strange problem while deploying my application (angular2 -express-starter plug) in Heroku. https://totalautosapp.herokuapp.com/ At first I thought it was Heroku, but I deployed it for netlify and it will happen.
It says:
Error: Unexpected value 'null' imported by the module 't'
Yes, there are many similar questions that have allowed me to understand the problem much better, but what blinds me is the "t" module. Which module is it in?
And most of the questions indicate that the unexpected value is "undefined", not "null". which brings me the idea that it imports a null module, but still doesn't know what it does, even when it works in devEnvironment.
Here is my app.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; import { routing } from './app.router'; import { effects, store, instrumentation } from './store'; import { SharedModule } from './shared/shared.module'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, SharedModule, FormsModule, HttpModule, store, effects, routing, instrumentation ], bootstrap: [ AppComponent ] }) export class AppModule {}
And if someone looked deeply, here is my general module: https://codeshare.io/adKKz5
Any help would be well appreciated.
EDIT:
Using console.log, I was able to compare the output from my local assembly and the hero. So I found that the null module is StoreDevToolsModule from ngrx / store-devtools.
This output is executed from a local run in the console.log (Instrument) line
Object { ngModule: StoreDevtoolsModule(), providers: Array[3] }
And this one from the hero
null main.d61dd7a248d9bbd30ca6.bundle.js:1:5868
Error: Unexpected value 'null' imported by the module 't'