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
We run react on Windows and one of my developers saw this, but no one else had the issue.
I watched them open VS Code to a sub directory of the project, then did a cd
to the project directory with lowercase (instead of the actual mixed case), then run npm start
.
You could actually see the directory name in lowercase in the terminal as c:\someproject\somedir
but in Windows explorer it is c:\SomeProject\SomeDir
.
I was surprised the Windows command terminal allows you to do this.
If you are using VS Code & you are doing "npm run dev" but that respective project folder isn't opened in VS Code then these 3 warnings will occur.
So the solution is: First open the respective project folder then only do "npm run dev"
this issue happens to me when I try to run npm start
in vscode terminal on window machine. and the issue was /desktop/flatsome
instead /Desktop/flatsome
just change the path to Desktop with a capital D
instead desktop with lowercase d
in your vscode terminal
Yes this happens if you use have used the same name but with case changed: for example, you have used
import React from 'React';
Instead of:
import React from 'react';
OMG I finally found the solution to my problem.
I am using the VS Code Terminal and it was using desktop instead of Desktop in the path of the prompt:
C:\Users\Hans\desktop\NODE JS\mysite>
To fix it, I just had to close the project folder and reopen it:
File -> Close Folder
File -> Open Folder
And now the VS Code Terminal is using the correct prompt path.
If you are seeing this in Visual Studio Code and Gitbash, go to settings, and search for C:\ (uppercase C) and change the path for the Gitbash.exe to c:\ and it will go away.