0
votes

I tried to add material design to my angular project .I included the lines

"scripts": [

  "../node_modules/hammer.js/hammer.min.js"
    ]

and then i got the following errors:-

92% additional asset processing scripts-webpack-plugin✖ 「wdm」: Error: ENOENT: no such file or directory, open '/Users/ratnabhkumarrai/Desktop/Angular practice/node_modules/hammer.js/hammer.min.js'

1
Which version of Angular are you using? - SiddAjmera

1 Answers

0
votes

Try the following to including hammerjs. Either simply, import hammerjs in your src/main.ts file per the Angular Material getting starting documentation:

import 'hammerjs';

Or update your path if you are adding it in scripts of the @angular/cli configuration as hammerjs resides in a node_modules directory named hammerjs, not hammer.js (no . character between hammer and js):

"scripts": [
  "node_modules/hammerjs/hammer.min.js"
]

Hopefully that helps!