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

Default Settings (non-typescript): VS Code reports several issues - ts(2440), ts(2307), and ts(2351) #4436

Closed
torueck opened this issue Aug 14, 2019 · 2 comments
Labels
needs team repro We acknowledged your report and will soon try to reproduce it

Comments

@torueck
Copy link

torueck commented Aug 14, 2019

Version

3.10.0

Reproduction link

https://github.com/torueck/vue-cli-issues-in-vscode

Environment info

VS Code 1.37 on Windows

Environment Info:

  System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
  Binaries:
    Node: 12.8.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.10.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.0.0
    @vue/babel-preset-app:  3.10.0
    @vue/babel-preset-jsx:  1.1.0
    @vue/babel-sugar-functional-vue:  1.0.0
    @vue/babel-sugar-inject-h:  1.0.0
    @vue/babel-sugar-v-model:  1.0.0
    @vue/babel-sugar-v-on:  1.1.0
    @vue/cli-overlay:  3.10.0
    @vue/cli-plugin-babel: ^3.10.0 => 3.10.0
    @vue/cli-plugin-eslint: ^3.10.0 => 3.10.0
    @vue/cli-service: ^3.10.0 => 3.10.0
    @vue/cli-shared-utils:  3.10.0
    @vue/component-compiler-utils:  2.6.0 (3.0.0)
    @vue/preload-webpack-plugin:  1.1.1
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
    vue: ^2.6.10 => 2.6.10
    vue-eslint-parser:  2.0.3 (5.0.0)
    vue-hot-reload-api:  2.3.3
    vue-loader:  15.7.1
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

  • Create project with vue-cli (e.g. vue create vue-default),
  • Choose default settings, especially choose NO Typescript support
  • Open ./src/main.js

What is expected?

No errors are reported

What is actually happening?

For ./src/main.js several issues are reported by VS Code:

{
"resource": "/d:/WebDev/Vue_3/vue-default/src/main.js",
"owner": "typescript",
"code": "2440",
"severity": 8,
"message": "Import declaration conflicts with local declaration of 'Vue'.",
"source": "ts",
"startLineNumber": 1,
"startColumn": 8,
"endLineNumber": 1,
"endColumn": 11
}

{
"resource": "/d:/WebDev/Vue_3/vue-default/src/main.js",
"owner": "typescript",
"code": "2307",
"severity": 8,
"message": "Cannot find module './App.vue'.",
"source": "ts",
"startLineNumber": 2,
"startColumn": 17,
"endLineNumber": 2,
"endColumn": 28
}

{
"resource": "/d:/WebDev/Vue_3/vue-default/src/main.js",
"owner": "typescript",
"code": "2351",
"severity": 8,
"message": "Cannot use 'new' with an expression whose type lacks a call or construct signature.",
"source": "ts",
"startLineNumber": 6,
"startColumn": 1,
"endLineNumber": 8,
"endColumn": 3
}


If I create the vue project with including typescript support, these errors do not occur.

@torueck
Copy link
Author

torueck commented Aug 14, 2019

#1198 may be related to this, although there typescript is enabled, which for me resolves the issue

@LinusBorg LinusBorg added the needs team repro We acknowledged your report and will soon try to reproduce it label Aug 15, 2019
@haoqunjiang
Copy link
Member

It's definitely a VSCode issue or VSCode extension issue. Not related to Vue CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs team repro We acknowledged your report and will soon try to reproduce it
Projects
None yet
Development

No branches or pull requests

3 participants