invoice-frontend | Invoicing application | Business library
kandi X-RAY | invoice-frontend Summary
kandi X-RAY | invoice-frontend Summary
Invoicing application (MIT)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of invoice-frontend
invoice-frontend Key Features
invoice-frontend Examples and Code Snippets
Community Discussions
Trending Discussions on invoice-frontend
QUESTION
I have a react app where I use absolute imports instead of relative imports (https://medium.com/@ktruong008/absolute-imports-with-create-react-app-4338fbca7e3d). Everything works as should on my local machine but when I try to build on docker it fails.
I have an .env file which contains NODE_PATH='./'
and create-react-app is configured in such a way that its webpack configuration will automatically pick up ‘.env’ files and read the NODE_PATH
environment variable, which can then be used for absolute imports so something like src/components/NavBar
, resolves.
But when I try to build on docker, it doesn't resolve but throws this error.
...ANSWER
Answered 2019-Feb-08 at 11:48Apparently, I named a folder navBar
and when I renamed it to be NavBar
, Git didn't detect a change in the foldername and didn't do anything about it. So on my local machine (which is a Mac), it shows NavBar but on Gitlab which uses git commits, it still appeared as navBar
and cos Docker runs on Linux and Linux is case sensitive, the build fails.
This also explains why the build worked on my local machine. Mac’s filesystem hfplus is case insensitive so it didn't see a problem.
To solve the renaming problem; I used the git mv
command. There’s a caveat tho; if you want to rename a foldername
to folderName
(ie change the case) on case insensitive file systems like Mac, you’ll get an error saying fatal: renaming ‘foldername’ failed: Invalid argument.
In order to rename the folder successfully, use this command.
git mv foldername tempname && git mv tempname folderName
. This splits the process into two steps; first renaming the foldername to tempname and the renaming tempname to folderName.
Hopefully, this helps someone
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install invoice-frontend
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page