Vetur: File '/Users/xxx/components/Logo.vue' is not a module

Created on 14 Feb 2020  路  2Comments  路  Source: vuejs/vetur

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

Info

Version: 1.42.1
Commit: c47d83b293181d9be64f27ff093689e8e7aed054
Date: 2020-02-11T14:44:27.652Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

Problem

error: File '/Users/xxx/components/Logo.vue' is not a module in vue file

image

import vue component is ok in ts file
image

nuxt build also is ok


Reproducible Case

  • create Nuxt.js + Typescript project

Most helpful comment

Can reproduce. Also, possible duplicate of #1187. As described in that issue, creating an empty export removes the error.

import Vue from 'vue'
export default Vue.extend({
  //
})

Edit: fix issue link

All 2 comments

Can reproduce. Also, possible duplicate of #1187. As described in that issue, creating an empty export removes the error.

import Vue from 'vue'
export default Vue.extend({
  //
})

Edit: fix issue link

Thanks, to add script resolve

Was this page helpful?
0 / 5 - 0 ratings