Error when running "npm run init"

Getting below error when trying to install pdf tron for SharePoint online. node version : 10.24.0

TypeError: lookups.flatMap is not a function
at Environment.resolver.lookup (C:\Users\INDREST\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\resolver.js:70:27)
at init (C:\Users\INDREST\AppData\Roaming\npm\node_modules\yo\lib\cli.js:130:7)
at Immediate.pre (C:\Users\INDREST\AppData\Roaming\npm\node_modules\yo\lib\cli.js:89:3)
at runCallback (timers.js:706:11)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
Failed to run @microsoft/sharepoint generator

Hello there.

Thanks for reaching out.

In order to further investigate this, I will need more information:
1 - Why are you running ‘npm run init’?
2 - Did you install webviewer before running ‘npm run init’?
3 - Is it SharePoint online or an on-premises instance?

I am not sure if you had the chance to go through WebViewer’s npm page, but it might help to get it started. You can find it here: @pdftron/webviewer - npm

Best Regards,

Diego Felix
Web Software Developer
PDFTron Systems, Inc.
www.pdftron.com

CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.

Yes, Its installed. After degarding the yo version it worked in local system. Now I am facing one more issue

  1. After running the command “gulp bundle --ship”. Its throwing an error as “No gulpfile found”

Hello there.

This message tells you that gulp is not finding the gulpfile. You can find more information on how to solve this issue in the following links:

Best Regards,

Diego Felix
Web Software Developer
PDFTron Systems, Inc.
www.pdftron.com

CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.