Unable to render doc from https URL
Unable to render doc from https URL
Whilre trying to load a docx file via a signed url, it throws the below Exception:
Failed to compile.
./node_modules/pdfjs-dist/build/pdf.js 389:20
Module parse failed: Unexpected token (389:20)
You may need an appropriate loader to handle this file type.
| }
| function _isValidProtocol(url) {
> switch (url?.protocol) {
| case "http:":
| case "https:":
Anyways to resolve this issue.
can share more information about that
encountered the same issue. the issue should be resolved by upgrading webpack to 5 or using babel/plugin-proposal-optional-chaining. I used the latter one, it worked for me
Getting the same one and also tried upgrading the webpack. But didn't work.
Any other solution?
this is a CORS issue the urls should be public
I am displaying Blob file
Here is the error that I am facing.
Failed to compile.
./node_modules/pdfjs-dist/build/pdf.js 389:20
Module parse failed: Unexpected token (389:20)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| }
| function _isValidProtocol(url) {
> switch (url?.protocol) {
| case "http:":
| case "https:":
/node_modules/pdfjs-dist/build/pdf.js 389:22 Module parse failed: Unexpected token (389:22) File was processed with these loaders:
- ./node_modules/babel-loader/lib/index.js You may need an additional loader to handle the result of these loaders. | } | function _isValidProtocol(url) {
switch (url?.protocol) {
| case "http:": | case "https:": i am also facing same issue