Is not a module error
See original GitHub issueInfo
- 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" />
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:8 (1 by maintainers)
Top Results From Across the Web
TypeScript ES6 import module "File is not a module error"
When I am trying to compile the main.ts file I get this error: Error TS2306: File 'test.ts' is not a module. How can...
Read more >TypeScript ES6 import module File is not a module error
I am using TypeScript 1.6 with ES6 modules syntax. My files are: test.ts: module App { export ... ' is not a module....
Read more >File is not a module error in TypeScript | bobbyhadz
The error "File is not a module" simply means that the file does not contain any export or import statements. Any file that...
Read more >ModuleNotFoundError: no module named Python Error [Fixed]
When you try to import a module in a Python file, Python tries to resolve this module in several ways. · As the...
Read more >Typescript es6 import module “File is not a module error”
Javascript – Typescript es6 import module “File is not a module error”. ecmascript-6javascripttypescript. I am using typescript 1.6 with es6 modules syntax.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Temporary solution. Add a ruler before error this comment
Duplicate of #1187, which will be fixed soon.