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

Typescript error This expression is not callable in config with module: nodnext and vue-tsc #487

Open
8 tasks done
silverwind opened this issue Dec 15, 2024 · 0 comments
Open
8 tasks done

Comments

@silverwind
Copy link

silverwind commented Dec 15, 2024

Related plugins

Describe the bug

When typescript module is nodenext, vue-tsc produces this error coming from this plugin:

vitest.config.ts:6:5 - error TS2349: This expression is not callable.
  Type 'typeof import("node_modules/@vitejs/plugin-vue/dist/index")' has no call signatures.

6     vuePlugin(),
      ~~~~~~~~~

Changing module to preserve works, but is undesirable in Node.js projects. Changing module to esnext also works but resolveJsonModule can not be used with it so is also not desirable.

Using official tsc instead of vue-tsc also works, but that breaks the typechecking of all .vue files, so also not desirable.

This might be a bug in vue-tsc, if so let me know and I will file it there.

Reproduction

https://github.com/silverwind/vue-plugin-not-callable

Steps to reproduce

Run npm i && npx tsc

System Info

"@vitejs/plugin-vue": "5.2.1",
"typescript": "5.6.3",
"vue-tsc": "2.1.10"

Used Package Manager

npm

Logs

No response

Validations

@silverwind silverwind changed the title Typescript error This expression is not callable in config with module: nodnext Typescript error This expression is not callable in config with module: nodnext and vue-tsc Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant