codedocu.de

Vue.js: error TS6504: File xxx.vue.js is a Javascript file. Did you mean to enable the allowJs

 

Vorkommen:

In vue.js mit Typescript

Fehler:

error TS6504: File ../src/views/Articles/Articles.vue.js' is a Javascript file. Did you mean to enable the 'allowJs' option?

  The file is in the program because:

    Matched by include pattern 'src/**/*' in ../tsconfig.json'

 

  tsconfig.json:3:27

    3   "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],

                                ~~~~~~~~~~

    File is matched by include pattern specified here.

 


Vue.js: error TS6504: File xxx.vue.js is a Javascript file. Did you mean to enable the allowJs

Solution:
in der Datei tsconfig.json muss man die Zeile allowJs:true einfügen

{

  "extends": "@vue/tsconfig/tsconfig.web.json",

  "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],

  "compilerOptions": {

    "baseUrl": ".",

    "allowJs": true,

    "paths": {

      "@/*": ["./src/*"]

    }

  },

 

  "references": [

    {

      "path": "./tsconfig.node.json"

    }

  ]

}

 

 

 

 

Vue.js: error TS6504: File xxx.vue.js is a Javascript file. Did you mean to enable the allowJs


Software Entwicklung Stuttgart Nürtingen
Suche Projekte C#, WPF, Windows App,ASP.Net, vb.Net, WinForms, SQL Server, Access, Excel