10-09-2018 03:19 AM
After generating a new ADF 2.6.0 app with Yeoman, when I try to preview a document I get the following error:
'pdfjsLib' is not defined
main.ts contains the following lines:
main.ts |
---|
import * as pdfjsLib from 'pdfjs-dist'; pdfjsLib.PDFJS.workerSrc = 'pdf.worker.js'; |
Sticking to 2.5.0 for my app
10-09-2018 07:32 AM
The following helped me:
- npm install pdfjs-dist@latest
- remove those 2 lines from the main.ts
- update "angular.json" asset, from "pdf.worker.js" to "pdf.worker.min.js"
- npm start
We will update the yeoman generator shortly.
10-09-2018 03:33 AM
Remove those two lines, they are not needed anymore
10-09-2018 03:38 AM
The lines are removed, but the error is still active.
10-09-2018 07:32 AM
The following helped me:
- npm install pdfjs-dist@latest
- remove those 2 lines from the main.ts
- update "angular.json" asset, from "pdf.worker.js" to "pdf.worker.min.js"
- npm start
We will update the yeoman generator shortly.
10-09-2018 07:48 AM
This worked for me too.
Thank you!
Explore our Alfresco products with the links below. Use labels to filter content by product module.