2

So I was updating a project from Angular 7 to Angular 9 and once I was done with the update the Automapper-ts is throwing error.

It was working perfectly fine with Angular 7. I am importing like this

import * as automapper from 'automapper-ts';

but now when I try to build it says

'automapper.d.ts' is not a module.

I have followed the exact steps mention on the Github page for Automapper-ts

I am kind of stuck now.

I am new to Angular so please bear with me if I am making a silly mistake :)

terminal output

karanbh11
  • 33
  • 7

1 Answers1

2

SOLUTION: Just add this to the top of your file:

import 'automapper-ts';
AntonioSk
  • 528
  • 3
  • 20
  • Yes i thought so and tried this myself and was able to build the project successfully but then I face a different error. Not sure whether it is linked to automapper-ts or not. – karanbh11 Oct 09 '20 at 11:47
  • vendor.56b6382590af3f372544.js:formatted:42959 ERROR TypeError: Cannot read property 'viewContainer' of undefined at e.t._forceRenderHeaderRows (vendor.56b6382590af3f372544.js:formatted:1379) at e.t.ngAfterContentChecked (vendor.56b6382590af3f372544.js:formatted:1135) at We (vendor.56b6382590af3f372544.js:formatted:42612) at Ve (vendor.56b6382590af3f372544.js:formatted:42603) at He (vendor.56b6382590af3f372544.js:formatted:42588) at ti (vendor.56b6382590af3f372544.js:formatted:43701) at vendor.56b6382590af3f372544.js:formatted:43691 ... continued – karanbh11 Oct 09 '20 at 11:50
  • create a new post on stackoverflow with the specific error so I can help you – AntonioSk Oct 09 '20 at 11:51
  • https://stackoverflow.com/questions/48330760/cannot-read-property-viewcontainerref-of-undefined – AntonioSk Oct 09 '20 at 11:53
  • yes sure, i'll do that in some time and will tag you along. – karanbh11 Oct 09 '20 at 11:53