I am getting ERROR in ./node_modules/diff2html/src/hoganjs-utils.js in angular6 cli app

369 Views Asked by At

I included the diff2html npm package to my angular6 project and when I compile it I get:

ERROR in ./node_modules/diff2html/src/hoganjs-utils.js
Module not found: Error: Can't resolve 'path' in 
'C:\codes\XXX\node_modules\diff2html\src'

Any idea what is causing this ?

I tried adding

    "scripts": [
        "node_modules/diff2html/dist/diff2html.min.js"
     ]

to angular.cli but that didn't help

1

There are 1 best solutions below

0
On

Ok, I found the solution. This fixed my problem: [https://github.com/rtfpessoa/diff2html/issues/169][1]