Skip to content

Error on "vue create" with babel, typescript and eslint/prettier #1972

Closed
@aryehof

Description

@aryehof

Version

3.0.0-rc.8

Node and OS info

Node v10.6.0, NPM 6.1.0, Windows 10

Steps to reproduce

Run "vue create" with options (manual)

Babel
TypeScript
Linter/Formatter

Use class-style component syntax? Y
Use Babel alongside TypeScript for auto-detected polyfills? Y
ESLint Prettier
Lint on save
In dedicated config files

What is expected?

Vue create succeeds without error

What is actually happening?

Creation results in the following errors:-

🚀 Invoking generators...
📦 Installing additional dependencies...

added 15 packages from 13 contributors and audited 14055 packages in 20.376s
found 0 vulnerabilities

  • Running completion hooks...error: 'Component' is defined but never used (no-unused-vars) at test6-vue-cli-rc8\src\App.vue:9:10:
    7 |
    8 | <script lang="ts">

9 | import { Component, Vue } from "vue-property-decorator";
| ^
10 | import HelloWorld from "./components/HelloWorld.vue";
11 |
12 | @component({

error: 'HelloWorld' is defined but never used (no-unused-vars) at test6-vue-cli-rc8\src\App.vue:10:8:
8 | <script lang="ts">
9 | import { Component, Vue } from "vue-property-decorator";

10 | import HelloWorld from "./components/HelloWorld.vue";
| ^
11 |
12 | @component({
13 | components: {

error: 'Component' is defined but never used (no-unused-vars) at test6-vue-cli-rc8\src\components\HelloWorld.vue:35:10:
33 |
34 | <script lang="ts">

35 | import { Component, Prop, Vue } from "vue-property-decorator";
| ^
36 |
37 | @component
38 | export default class HelloWorld extends Vue {

error: 'msg' is not defined (no-undef) at test6-vue-cli-rc8\src\components\HelloWorld.vue:39:19:
37 | @component
38 | export default class HelloWorld extends Vue {

39 | @prop() private msg!: string;
| ^
40 | }
41 | </script>
42 |

error: 'JSX' is not defined (no-undef) at test6-vue-cli-rc8\src\shims-tsx.d.ts:4:13:
2 |
3 | declare global {

4 | namespace JSX {
| ^
5 | // tslint:disable no-empty-interface
6 | interface Element extends VNode {}
7 | // tslint:disable no-empty-interface

error: 'ElementClass' is not defined (no-undef) at test6-vue-cli-rc8\src\shims-tsx.d.ts:8:15:
6 | interface Element extends VNode {}
7 | // tslint:disable no-empty-interface

8 | interface ElementClass extends Vue {}
| ^
9 | interface IntrinsicElements {
10 | [elem: string]: any;
11 | }

error: 'IntrinsicElements' is not defined (no-undef) at test6-vue-cli-rc8\src\shims-tsx.d.ts:9:15:
7 | // tslint:disable no-empty-interface
8 | interface ElementClass extends Vue {}

9 | interface IntrinsicElements {
| ^
10 | [elem: string]: any;
11 | }
12 | }

error: 'elem' is not defined (no-undef) at test6-vue-cli-rc8\src\shims-tsx.d.ts:10:8:
8 | interface ElementClass extends Vue {}
9 | interface IntrinsicElements {

10 | [elem: string]: any;
| ^
11 | }
12 | }
13 | }

8 errors found.

(command prompt)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions