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.d.ts has bad reference to module 'v3-component-public-instance' #12666

Closed
sandersn opened this issue Jul 15, 2022 · 0 comments
Closed

vue.d.ts has bad reference to module 'v3-component-public-instance' #12666

sandersn opened this issue Jul 15, 2022 · 0 comments

Comments

@sandersn
Copy link
Contributor

sandersn commented Jul 15, 2022

Version

2.7.6

Reproduction link

dev.azure.com

Steps to reproduce

Install vue@2.7.6 and try to compile with typescript:

$ mkdir fresh; cd fresh
$ npm i vue@2.7.6
$ echo "import * as v from 'vue'" >index.ts
$ tsc index.ts --target esnext --moduleResolution node

What is expected?

No errors

What is actually happening?

Error from tsc:
node_modules/vue/types/vue.d.ts(17,41): error TS2307: Cannot find module 'v3-component-public-instance' or its corresponding type declarations.


Found in various vue 2 dependents on Definitely Typed's overnight test run.

'v3-component-public-instance' is a local module, so the reference should be './v3-component-public-instance'

When editing vue.d.ts inside the vue repo, tsconfig is set up such that 'v3-component-public-instance' also resolves, but this doesn't work when vue is imported normally.

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

No branches or pull requests

1 participant