Skip to content

[dts-generator] Cannot find any OpenUI5 library #488

Closed

Description

@eurushibata

Describe the bug
When running the command

ui5-download-apijson sap.m,sap.ui.core,sap.ui.integration,sap.tnt,sap.ui.layout,sap.ui.table,sap.uxap 1.120.26 --targetDir ./dist/test-resources/api

it returns

[info] @ui5/dts-generator/download-apijson: Download api.json files for
[info] @ui5/dts-generator/download-apijson:   libs: sap.m,sap.ui.core,sap.ui.integration,sap.tnt,sap.ui.layout,sap.ui.table,sap.uxap
[info] @ui5/dts-generator/download-apijson:   version: 1.120.26
[info] @ui5/dts-generator/download-apijson:   targetDir: ./dist/test-resources/api
[info] @ui5/dts-generator/download-apijson: 
[error] @ui5/dts-generator/download-apijson: error fetching sapui5 metadata
[error] @ui5/dts-generator/download-apijson: An error occurred Error: One of the libraries was given as 'sap.m', but this library does not seem to exist among the OpenUI5 libraries in the given version.
      Available OpenUI5 libraries in this version are: .
    at file:///Users/user/workspace/sol-ui-op.worktrees/fb_28947_central_mockserver/node_modules/@ui5/dts-generator/dist/js-utils/ui5-metadata.js:80:19
    at Array.forEach (<anonymous>)
    at expandTransitiveDeps (file:///Users/user/workspace/sol-ui-op.worktrees/fb_28947_central_mockserver/node_modules/@ui5/dts-generator/dist/js-utils/ui5-metadata.js:78:10)
    at download (file:///Users/user/workspace/sol-ui-op.worktrees/fb_28947_central_mockserver/node_modules/@ui5/dts-generator/dist/download-apijson.js:23:37)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (file:///Users/user/workspace/sol-ui-op.worktrees/fb_28947_central_mockserver/node_modules/@ui5/dts-generator/dist/download-apijson.js:39:5)

Expected behavior
expected to have the api.json file with all libraries

Additional context

upon checking the code, it seems that the openui5 metadata is captured from https://registry.npmjs.com/-/v1/search?text=scope:openui5&size=100 according to js-utils/ui5-metadata.js but the query always return empty

Activity

  1. akudev commented on Feb 13, 2025

    @akudev
    Member

    This looks odd. The query being written as it is, I'm sure it used to work in the past. Maybe a temporary glitch on npmjs side? It would surprise me if they just change the search behavior like this.
    We might query for "@openui5" (with higher limit) and then filter the results for packages that really are @openui5/...

  2. changed the title [-][ts-interface-generator] Cannot find any OpenUI5 library[/-] [+][dts-generator] Cannot find any OpenUI5 library[/+] on Mar 5, 2025
  3. akudev commented on Mar 5, 2025

    @akudev
    Member

    I checked again and pages like https://blog.npmjs.org/post/159539048360/scope-support-in-search-and-download-stats and https://stackoverflow.com/questions/44228981/npm-registry-api-scoped-packages clearly indicate this used to work. But I didn't find any announcement of this being no longer supported (e.g. on https://github.blog/changelog/label/npm/). Will look into a solution, as we are also affected.

  4. codeworrior commented on Mar 5, 2025

    @codeworrior
    Member

    When I ran into this the last time, I simply replaced the query with a check for the scope @openui5 as, by convention, anything in that scope should be available in the npm registry.

  5. akudev commented on Mar 5, 2025

    @akudev
    Member

    Fixed, thanks for reporting. I am working on another thing, will trigger a release once that is done.

  6. akudev commented on Mar 12, 2025

    @akudev
    Member

    @ui5/dts-generator 3.6.0 including the fix has just been published.

  7. akudev commented on Mar 12, 2025

    @akudev
    Member

    When I ran into this the last time, I simply replaced the query with a check for the scope @openui5 as, by convention, anything in that scope should be available in the npm registry.

    ...and then you created #482, which I unfortunately missed. You think we should go for that solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions