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

How to use with jiti to make it compatible with vscode-uri #183

Closed
2 tasks done
Miofly opened this issue Nov 3, 2022 · 3 comments · Fixed by #206
Closed
2 tasks done

How to use with jiti to make it compatible with vscode-uri #183

Miofly opened this issue Nov 3, 2022 · 3 comments · Fixed by #206
Labels

Comments

@Miofly
Copy link

Miofly commented Nov 3, 2022

Describe the bug

0.4.9 run corret, but 0.5 more incorrect
image

Reproduction

no

Expected behavior

start error

System Info

System:
    OS: macOS Mojave 10.14.6
    CPU: (6) x64 Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz
    Memory: 24.96 MB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.0.0 - /usr/local/opt/nvm/versions/node/v16.0.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.10.0 - /usr/local/opt/nvm/versions/node/v16.0.0/bin/npm
  Browsers:
    Chrome: 102.0.5005.115
    Firefox: 99.0.1
    Safari: 12.1.2

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@fi3ework
Copy link
Owner

@Miofly Could you give a re-production of how to use Vite & vite-plugin-checker & jiti together?

@fi3ework
Copy link
Owner

And thanks @Litarvan, this is properly a bug of jiti. If a re-production could be provided. I think it's easy to make a hack to compatible with jiti. Before 0.5.0, vite-plugin-checker only ships a CJS version. From 0.5.0, ESM and CJS version are both shipped and ESM is adopted by jiti IMO.

@fi3ework fi3ework changed the title start error How to use with jiti to make it compatible with vscode-uri Jan 23, 2023
@fi3ework fi3ework added the upstream Bug in a dependency label Jan 23, 2023
@Litarvan
Copy link

This is really strange, because it seems Nuxt is trying to load the ESM module in both a CJS and a ESM way. I've attached a reproduction of the bug itself in the Jiti issue.
It can also easily be reproduced by setting up a blank Nuxt 3 project, registering vite-plugin-checker, and starting the dev server.

In the meantime, I used a (dirty) workaround on my side which I've described in my own issue

@fi3ework fi3ework linked a pull request Jan 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants