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

Incompatible tslib version imported by Feast UI #4521

Closed
peruukki opened this issue Sep 15, 2024 · 0 comments · Fixed by #4525
Closed

Incompatible tslib version imported by Feast UI #4521

peruukki opened this issue Sep 15, 2024 · 0 comments · Fixed by #4525

Comments

@peruukki
Copy link
Contributor

peruukki commented Sep 15, 2024

Expected Behavior

Feast UI dependencies should be resolved to compatible versions regardless of the package manager used.

Current Behavior

When using the Feast UI package as a module in a project that has npm or pnpm as its package manager, I get this error when starting my application:

✘ [ERROR] No matching export in "node_modules/tslib/tslib.es6.js" for import "__spreadArray"

    node_modules/@feast-dev/feast-ui/dist/feast-ui.module.js:9:44:
      9 │ import { __assign as __assign$2, __extends, __spreadArray } from 'tslib';
        │                                             ~~~~~~~~~~~~~
        ╵                                             __spreadArrays

  Did you mean to import "__spreadArrays" instead?

    node_modules/tslib/tslib.es6.js:150:16:
      150 │ export function __spreadArrays() {
          ╵                 ~~~~~~~~~~~~~~

__spreadArray was added in tslib 2.1.0, so the error means the code is importing an older version of tslib.

I don't see this error if I switch to Yarn 1 (Classic), presumably it resolves the tslib version to a later one due to different dependency resolution strategies.

Steps to reproduce

I created an example React app with Vite (Create React App is no longer recommended). You can clone it and install the dependencies with npm i or pnpm i, and start the app with npm dev or pnpm dev. (Enable pnpm with corepack enable if needed.)

Specifications

  • Version: 0.40.0 (@feast-dev/feast-ui version)
  • Platform: WSL or macOS
  • Subsystem: -

Possible Solution

As shown by the error, tslib is a runtime dependency because code in dist imports from it. However, tslib is included in the project's devDependencies. Moving it to dependencies should ensure that a compatible version is always installed and referenced by Feast UI. Currently it picks up the version from its dependencies or from the consuming application.

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

Successfully merging a pull request may close this issue.

1 participant