Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File name differs from already included file name only in casing.Vetur(1149)

There is nothing wrong with my folder structure or code.

However, after one time I change my folder name, Vetur keeps yelling this message to me.

I've tried the following things

  1. completely delete repo and commit new git
  2. reinstall Vetur
  3. reboot the computer
  4. remove node_modules

but the problem still there, how can I fix it?


2022 August Update:

It could still be reproducible, but the error description may differ; the reproduction:

  1. Make a file named Example.vue.
  2. import Example.vue into some other file
  3. Change the name Example.vue to example.vue
  4. Refactor the import statement to be example.vue as well.
  5. The error message will appear.
like image 267
Joseph Wang Avatar asked Jul 27 '20 05:07

Joseph Wang


1 Answers

(Using vue.js v3) My solution was NOT to use the file extension '.vue':

Failed:

import X from './components/X.vue'

Succeeded:

import X from './components/X'
like image 103
Zaphod Beeblebrox Avatar answered Oct 23 '22 20:10

Zaphod Beeblebrox