SAP/ui5-webcomponents-react

Vite Build fails on 2.5.0

Closed this issue · 2 comments

Describe the bug

Just upgraded to https://www.npmjs.com/package/@ui5/webcomponents-react/v/2.5.0 and I get following build errors

Webcomponents / -React / -compat 2.5.0
Vite 4.5.2

[vite]: Rollup failed to resolve import "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js" from ".../node_modules/@ui5/webcomponents/dist/List.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js" from ".../node_modules/@ui5/webcomponents/dist/List.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at viteWarn (file:///.../node_modules/vite/dist/node/chunks/dep-52909643.js:48216:27)
...

...>node_modules/@ui5/webcomponents-react/dist/webComponents/TableVirtualizer/index.d.ts:2:45 - error TS2307: Cannot find module '@ui5/webcomponents/dist/TableVirtualizer.js' or its corresponding type declarations.

2 import type { RangeChangeEventDetail } from '@ui5/webcomponents/dist/TableVirtualizer.js';
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@ui5/webcomponents-react/wrappers/webComponents/TableVirtualizer/index.d.ts:2:45 - error TS2307: Cannot find module '@ui5/webcomponents/dist/TableVirtualizer.js' or its corresponding type declarations.

2 import type { RangeChangeEventDetail } from '@ui5/webcomponents/dist/TableVirtualizer.js';
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What other information can I provide?

Isolated Example

No response

Reproduction steps

No response

Expected Behaviour

No response

Screenshots or Videos

No response

UI5 Web Components for React Version

2.5.0

UI5 Web Components Version

2.5.0

Browser

Chrome

Operating System

Windows 11

Additional Context

No response

Relevant log output

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.

Hi @wvudako

I tested the behavior using our Vite template, and no error was thrown in my case: https://stackblitz.com/edit/github-pj4eie8q?file=src%2FApp.tsx.

If you can’t reproduce the behavior in a StackBlitz sandbox, please create a sample repository that we can check out to investigate the issue.

Your stackblitz gave me a hint to what the configuration issue is. Fixed and sorry for the troubles