Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui5-tooling-modules] package pdfservices-node-sdk not resolveable #992

Closed
bsehp opened this issue May 7, 2024 · 4 comments
Closed

[ui5-tooling-modules] package pdfservices-node-sdk not resolveable #992

bsehp opened this issue May 7, 2024 · 4 comments
Labels
author action Waiting for feedback by issue author

Comments

@bsehp
Copy link

bsehp commented May 7, 2024

Describe the bug
package https://www.npmjs.com/package/@adobe/pdfservices-node-sdk can not be used

To Reproduce
Steps to reproduce the behavior:

  1. create empty ui5 app in bas
  2. install npm modules ui5-tooling-modules & @adobe/pdfservices-node-sdk
  3. add library to controller (sap.ui.define "@adobe/pdfservices-node-sdk" & function (Controller, ps)
  4. change ui5.yaml according to https://www.npmjs.com/package/ui5-tooling-modules
  5. ui5loader-dbg.js:1190 Uncaught (in promise) ModuleError: Failed to resolve dependencies of 'pdfservices/controller/View1.controller.js'

Expected behavior
dependency can be resolved

Screenshots
image
image
image
image
image

Desktop (please complete the following information):

  • OS: windows10
  • Browser chrome
  • Version 123.0.6312.123
@petermuessig petermuessig changed the title package pdfservices-node-sdk not resolveable [ui5-tooling-modules] package pdfservices-node-sdk not resolveable May 7, 2024
@petermuessig
Copy link
Member

@bsehp it looks like the @adobe/pdfservices-node-sdk requires file system operations which are not mocked consistently by the polyfills and therefore it lacks some functions which are needed in the loading flow of the module. I need to check whether we can do something here or not...

@swgtp
Copy link

swgtp commented May 8, 2024

Hey, I've got the same problem as well. I would appreciate it, if you find something.

@petermuessig
Copy link
Member

@bsehp @swgtp - I just checked the documentation of the Adobe PDF Services API and it states the following:
https://developer.adobe.com/document-services/docs/overview/pdf-services-api/

The SDK only supports server-based use cases where credentials are saved securely in a safe environment. SDK credentials should not be sent to untrusted environments or end user devices.

While looking into the issue during the generation, it lacks the existence of fs apis in the polyfills for the node modules. Although this could be manually tweaked, I wonder if this is really a proper scenario to have this library at client-side. IMO, you should use it on the server-side and send the requests to your server which communicates with the Adobe PDF Service.

WDYT?

@petermuessig petermuessig added the author action Waiting for feedback by issue author label May 26, 2024
@petermuessig
Copy link
Member

Closing due to my last answer - it's rather a server-side module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author action Waiting for feedback by issue author
Projects
None yet
Development

No branches or pull requests

3 participants