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

After 4.2.X update i get TS2307: Cannot find module ... error on all my .vue files #384

Closed
3 tasks done
auirarrazaval opened this issue Sep 14, 2024 · 2 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@auirarrazaval
Copy link

auirarrazaval commented Sep 14, 2024

Describe the bug

It took me a while to narrow this down from the project, but eventually I came to realize that this library's update is what triggered the errors. I'm guessing that it's related to the vue language server, but no sure what exactly.

In general terms, when updating to v4.2.X a TS2307 error starts showing up for every vue file. I have provided a minimum reproduction, which is basically my project trimmed

Reproduction

https://github.com/auirarrazaval/vite-plugin-dts-build-error-repr

Steps to reproduce

git clone ...
# In case not enabled, to use yarn4
corepack enable
yarn
yarn install
yarn sdks
yarn build

Notice that the build goes through. Also note that the vue-tsc command runs with no issues, but the tsc error shows up when building
image

If you downgrade vite-plugin-dts to @4.0.3, the error doesn't show up:
image

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 9 5900HS with Radeon Graphics
    Memory: 2.25 GB / 7.76 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 20.16.0 - /tmp/xfs-47c61424/node
    Yarn: 4.4.1 - /tmp/xfs-47c61424/yarn
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm

libraries should be the versions sin the package.json, as I updated it

Validations

@qmhc qmhc added the pending Need further confirmation label Sep 18, 2024
@qmhc
Copy link
Owner

qmhc commented Sep 18, 2024

It seems to only be occurred with yarm@4 ...

Should be a bug with pnp mode, because the package resolve method doesn't support pnp.

@qmhc qmhc added bug Something isn't working and removed pending Need further confirmation labels Sep 18, 2024
qmhc added a commit that referenced this issue Sep 24, 2024
@qmhc qmhc closed this as completed in 984f487 Sep 24, 2024
@auirarrazaval
Copy link
Author

@qmhc Just want to confirm that 4.2.2 solved the issue. Thank you for your help!

@auirarrazaval auirarrazaval changed the title After 2.1.X update i get TS2307: Cannot find module ... error on all my .vue files After 4.2.X update i get TS2307: Cannot find module ... error on all my .vue files Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants