We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

React PDFViewer gives compile time error

I am doing a POC for the React PDFViewer and referred https://ej2.syncfusion.com/react/demos/#/material/pdfviewer/default

After performing all the steps mentioned I get an error in the index.js of ej2-drawings which only has an export statement - "Uncaught SyntaxError: Unexpected token export"

I went to StackBlitz link in above demo but that also gives an error "Can't find package:@syncfusion/ej2-drawings".

Can you please add/update steps to use ej2-react-pdfviewer.

  • Browser: chrome
  • OS: windows 10
  • Integration version: React16
  • @syncfusion/ej2-react-pdfviewer
Please let  me know the missing info.

Thanks!

7 Replies

AA Akshaya Arivoli Syncfusion Team August 21, 2019 10:55 AM UTC

Hi Abit, 

Thank you for contacting Syncfusion support. 

Please find the details from the below, 
Query  
Details 
I am doing a POC for the React PDFViewer and referred https://ej2.syncfusion.com/react/demos/#/material/pdfviewer/default 

After performing all the steps mentioned I get an error in the index.js of ej2-drawings which only has an export statement - "Uncaught SyntaxError: Unexpected token export" 

We are unable to reproduce the reported issue with the provide details. We have created simple PDF Viewer sample (v17.2.0.34) and shared the same in the following location, 


Please try with the provided sample and if you still have any concerns revert us with the modified sample in which the issue could be reproduce, Essential Studio Version and the PDF document. These details will be helpful for us to investigate further and assist you better. 
I went to StackBlitz link in above demo but that also gives an error "Can't find package:@syncfusion/ej2-drawings". 

We can  reproduce reported issue in our online link, we are working on it and it resolved in our upcoming releases. 



Regards, 
Akshaya. 



AR ABIT RCM August 21, 2019 05:06 PM UTC

Hi Akshaya,

The sample shared is in tsx format can you please share one in jsx, it will be very helpful.

Thank you!


AA Akshaya Arivoli Syncfusion Team August 22, 2019 01:17 PM UTC

Hi Abit, 

We have created the sample with jsx as per your requirement and shared the same in the following location, 


Please try this and let us know if you have any concerns on this. 

Regards, 
Akshaya 



AR ABIT RCM September 5, 2019 06:17 AM UTC

Hello Akshaya, 

Our app is upgraded to 16.7 but not all the libraries were updated along. The react-scripts version is 0.4.3. 
I think due to this the source files of Sync-fusion are not getting loaded correctly at runtime therefore issues are occurring.  I installed all the libraries mentioned under react-scripts version 3.1.1 (https://www.npmjs.com/package/react-scripts/v/3.1.1) but still it does not work.

We were doing a POC on another of SyncFusion's product and ran into a similar issue. We had a web meeting for the same and they are now able to reproduce the issue on their end, you can refer - 

Please let me know if a web meeting would help you to reproduce and fix the issue. I have attached a screenshot of the issue at my end with react-scripts 0.4.3. It would be great if there is a work around and we do not need to upgrade the libraries in order to consume SyncFusion.

Thanks!

Attachment: PDFViewer__Unexpected_token_error_1b4edee7.zip


AA Akshaya Arivoli Syncfusion Team September 6, 2019 01:53 PM UTC

Hi Abit, 

We can reproduce the console error with react-scripts package with 0.4.3 version and suspect this to be defect. We will analyze further on this and update you with more details on September 10th, 2019 

Regards, 
Akshaya 



AR ABIT RCM September 17, 2019 05:28 PM UTC

Hi Akshaya,

Can you please share the ETA for this fix, our one month trial period will end on 19th September but the evaluation will not be complete without the update, hence it would be difficult to decided on licensing. 

Thanks!


AA Akshaya Arivoli Syncfusion Team September 18, 2019 01:32 PM UTC

Hi Abit, 
  
Sorry for the inconvenience caused. 
  
We have confirmed that the reported issue is a defect and the patch for the issue will be included in our 2019 Volume 3 release which is expected to be rolled out in the end of September. You can track the status of the bug using the below feedback link, 
  
  
Please let us know if you have any concerns on this. 
  
Regards, 
Akshaya 


Loader.
Live Chat Icon For mobile
Up arrow icon