0

I installed npm i ngx-extended-pdf-viewer. Then added these chages in package-cli.json

"assets": ["assets","favicon.ico",{"glob": "**/*","input": "node_modules/ngx-extended-pdf-viewer/bleeding-edge/","output": "assets/" }]

Then I tried to add scripts in angular-cli.json, But im getting error saying:

ENOENT: no such file or directory, open '/---/---/-----/----/src/node_modules/ngx-extended-pdf-viewer/assets/pdf.js'

"scripts": [ "node_modules/ngx-extended-pdf-viewer/assets/pdf.js", "node_modules/ngx-extended-pdf-viewer/assets/pdf.worker.js", "node_modules/ngx-extended-pdf-viewer/assets/viewer.js" ]

Im not able to run project. It will stop compiling when it starts searching for the path.I checked the path. The folder and file exist properly in place. Im so confued.Anybody come across this issue please help me to solve this. I'm beginner to angular.

Stephan Rauh
  • 3,069
  • 2
  • 18
  • 37
Preeth
  • 21
  • 5

1 Answers1

0

I noticed you may have a missing / in front of assets in "output": "assets/"

So you may want to try adding that

"assets": [
    "assets",
    "favicon.ico",
    {
        "glob": "**/*",
        "input": "node_modules/ngx-extended-pdf-viewer/bleeding-edge/",
        "output": "/assets/" 
    }
]

As missing that might be the cause of the error.

Belle Zaid
  • 172
  • 3
  • 9