I\'m using webpack 3.8.1 and am receiving several instances of the following build warning:
WARNING in ./src/Components/NavBar/MainMenuItemMobile.js
There a
// waring
import Test from './TestHome'
// you can rename your file with camel-case and import
import Test from './test-home'
// or you should fix the path
import Test from '@/views/TestHome'
Hope the two ways will solve your problem。
This is usually a result of a minuscule typo.
For instance, if you are importing your modules like import Vue from 'vue'
, import Vuex from 'vuex'
.
Go through your files and check where you used from 'Vue'
or from 'Vuex'
- make sure to use the exact same capitals (uppercase letters) as in your import statements.
The error descriptions should have been written more clearly, but what I explained has been the cause of my problem each time for this error on webpack commands.
Similar issue, but my problem was packages installed in C:\Users\<username>\AppData\Local\Yarn
. Deleting that folder and re-adding the global packages I wanted fixed the issue.
It happened to me on angular 6. It's capital and small letter misusage error which your ide or text editor may ignore. I USED
import { PayComponent } from './payment/pay/pay.component';
INSTEAD OF
import { PayComponent } from './Payment/pay/pay.component';
IMAGINE JUST "P" and "p". Goodluck.
The case of the letter drive also matter. In my case, Windows 10 had the upper case 'C' while I had lower case 'c' in the file.
I had the same issue in angular 6 project.
This issue occurred because while importing component in the module like
import { ManageExamComponent } from './manage-Exam.component';
I have written like manage-Exam where Exam is in capital letter and webpack understand small letter.
As soon as i used
import { ManageExamComponent } from './manage-exam.component';
used exam in small and issue resolved.