Are you tired of deleting the same things and adding the same extra packages to create-react-app just to get up and running? Don't you just wish yo...
For further actions, you may consider blocking this person and/or reporting abuse
I followed your steps but somehow I keep getting this message. Getting stuck there:
Error: ENOENT: no such file or directory, stat '/Users/vladislavburlutskiy/Documents/Lambda/my-app/gitignore'
This is your error. No such file as gitignore
.gitignore !== gitignore
Check the file name.
I know, somehow cra is not adding the dot in front of gitignore
Can you push your code to GitHub so I can check it out? I've never encountered this error myself, so I don't have a quick solution. But if I can see you code maybe I'll have a better idea.
I found the bug and fixed it already.
What was it?
I initially had gitignore outside the template folder and npm published it as such. Then I fixed that and moved it inside the
template
folder, however I didn't npm publish an updated version.Ah! That makes sense! Yeah, once you said the dot wasn't in front of it, that's what I figured. Forgetting to publish my changes has got me a time or two as well! Glad you got it figured out!
I also created a separate repo for my cra template:
github.com/nezlobnaya/cra-template...
and I added an alias (
alias create-react-app-custom="npx create-react-app --template=file: path/to/folder
) to my .zshrc file to quickly run it locallyIf you have a .gitignore delete the dot and do just gitignore maybe?
Looks like it can't find gitignore, do you have a dot in front of it?
I don't, Jimmy. Obviously, there is something else
Check the path that your gitignore file is compared to where the error says it isn't. The error is obviously trying to tell you what's wrong.
I like your template's idea, but I think you are creating confusion by using/mixing both
SASS
andstyled-components
.Personally, I would want all styling variables handled by styled-components. It is easy to
import { createGlobalStyle }...
and define CSS globals there. Then apply them by wrapping the main<App>
with a<ThemeProvider>
component - See styled-components.com/docs/api#cre...I don't see you using SASS color manipulation functions, so I'm wondering, other than those, why choose to use SASS at all?
At this point, just for color variables. But I'm really digging what you're putting down. I'm actually refactoring my style library to lean solely on styled-components and factoring out sass. π
Why it was in there at all was because the style library I had created was (and is) a baby. It helps you lay out a page really well, but it wasn't that pretty. So I included sass to pretty up everything after it was laid out.
Hello Jimmy, thank you for this great article. Help me so much for starting to create my custom CRA template. However, I have question. As mentioned in this article, you also provide
devDependencies
inside template.json. I also did the same. But, unfortunately, thedevDependencies
not installed when I run the CRA command. After several minutes trying to solve, I found out thatdevDependencies
is blacklisted to be present inside the template.json. Here is the code I found in CRA github github.com/facebook/create-react-a.... Are you face the same problem?Thank you in advance.