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

vue 3.4.18 (since 3.4.16) with vite 5.1.1 and rollup-typescript-plugin2 (ui-kit) build error #10300

Closed
nestle49 opened this issue Feb 9, 2024 · 3 comments
Labels
need more info Further information is requested

Comments

@nestle49
Copy link

nestle49 commented Feb 9, 2024

Vue version

3.4.18

Link to minimal reproduction

3.4.18 (since 3.4.16)

Steps to reproduce

  1. Clone repository
  2. npm install
  3. npm run build

If I downgrade vue version to 3.4.15, it's okay, but not after upgrade to 3.4.16 or later (3.4.18)

System Info

System:
    OS: macOS 14.3
    CPU: (8) arm64 Apple M1
    Memory: 47.88 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.5.1 - ~/.nvm/versions/node/v20.5.1/bin/node
    npm: 9.8.0 - ~/.nvm/versions/node/v20.5.1/bin/npm
  Browsers:
    Chrome: 121.0.6167.160
    Safari: 17.3
  npmPackages:
    vue: 3.4.18 => 3.4.18

Any additional comments?

No response

@nestle49 nestle49 changed the title vue 3.4.18 with vite 5.1.1 and rollup-typescript-plugin2 (ui-kit) build error vue 3.4.18 (since 3.4.16) with vite 5.1.1 and rollup-typescript-plugin2 (ui-kit) build error Feb 9, 2024
@LinusBorg LinusBorg added the need more info Further information is requested label Feb 9, 2024
@LinusBorg
Copy link
Member

There's nothing in this report that would allow us to investigate the cause of the problem. Please provide us with a reproduction.

@nestle49
Copy link
Author

nestle49 commented Feb 12, 2024

There's nothing in this report that would allow us to investigate the cause of the problem. Please provide us with a reproduction.

@LinusBorg
Okay, I agree, I created minimal reproduction https://github.com/nestle49/minimalReproduction

I get build error after upgrade vue version to 3.4.16 or later

Steps to reproduce
Clone repository
npm install
npm run build

If I downgrade vue version to 3.4.15, it's okay, but not after upgrade to 3.4.16 or later (3.4.18)

@yyx990803
Copy link
Member

Traced this down to the dependency update commit #10175

Root cause is the upgrade of lru-cache from 10.1.0 to 10.2.0 included this change which causes the result of calling Object.prototype.toString on the parseCache export of compiler-sfc has changed.

rollup-plugin-typescript2 uses object-hash to hash options, which somehow encounters the new LRUCache class and throws because the string type has changed to something it does not support.

It's a bit unfortunate that a seemingly harmless bump can cause issues like this. I think it's better to pin lru-cache considering we are only using the Map compatible interface and don't expect the implementation to change.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants