I've project created using Visual Studio Angular Template
. I recently updated my Angular
from 6 to 7 and Typescript
to 3.1.6. Also upgraded Webpack
from 3.8.1 to 3.12.0.
Now when I try to compile using webpack command I get the following error
ERROR in [at-loader] ./ClientApp/boot.server.ts:30:17
TS2304: Cannot find name 'setImmediate'.
This error is thrown from boot.server.ts code
return platformDynamicServer(providers).bootstrapModule(AppModule).then(moduleRef => {
const appRef: ApplicationRef = moduleRef.injector.get(ApplicationRef);
const state = moduleRef.injector.get(PlatformState);
const zone: NgZone = moduleRef.injector.get(NgZone);
return new Promise<RenderResult>((resolve, reject) => {
zone.onError.subscribe((errorInfo: any) => reject(errorInfo));
appRef.isStable.pipe(first(isStable => isStable)).subscribe(() => {
// Because 'onStable' fires before 'onError', we have to delay slightly before
// completing the request in case there's an error to report
setImmediate(() => {
resolve({
html: state.renderToString()
});
moduleRef.destroy();
});
});
});
});
I'm trying to fix this for some time but no success. Any idea>