Vetur: Is not a module error

Created on 30 Mar 2020  路  8Comments  路  Source: vuejs/vetur

  • [x] I have searched through existing issues
  • [x] I have read through docs
  • [x] I have read FAQ

Info

  • Platform:
  • Vetur version: 0.24.0
  • VS Code version: 1.43.0-insider

Problem

In a TypeScript CLI generated project (no Babel) the following __import__ in "App.vue" reports a "not a module" error!

// File: App.vue
<script lang="ts">
import HelloWorld from "./components/HelloWorld/HelloWorld.vue";

__Error: "HelloWorld.vue is not a module"__

Project builds and runs fine, but Vetur fails to determine the file is a module.

The file "__HelloWorld.vue__" file contains.

<template>
  <div>
    <h1>Hello World!</h1>
  </div>
</template>

<script lang="ts" src="./HelloWorld.ts" />
<style scoped lang="stylus" src="./HelloWorld.stylus" />

vetur

duplicate

Most helpful comment

Temporary solution.
Add a ruler before error this comment

// @ts-ignore

All 8 comments

I have same issue when start a new project nuxtjs with typescript !

Demo: https://prnt.sc/rpvv4p

same here. Does anyone have a workaround for this issue?

Problem in nestjs when creating a new project.
Probably doesn't detect

Related issues

deangoku picture deangoku  路  3Comments

sacki5 picture sacki5  路  3Comments

octref picture octref  路  3Comments

LukeLin picture LukeLin  路  3Comments

AnnAngela picture AnnAngela  路  3Comments