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'
at Object.statSync (fs.js:1086:3)
at Object.statSync (/Users/vladislavburlutskiy/Documents/Lambda/my-app/node_modules/graceful-fs/polyfills.js:307:34)
at statSync (/Users/vladislavburlutskiy/Documents/Lambda/my-app/node_modules/fs-extra/lib/util/stat.js:10:52)
at getStatsSync (/Users/vladislavburlutskiy/Documents/Lambda/my-app/node_modules/fs-extra/lib/util/stat.js:24:19)
at Object.checkPathsSync (/Users/vladislavburlutskiy/Documents/Lambda/my-app/node_modules/fs-extra/lib/util/stat.js:49:33)
at Object.moveSync (/Users/vladislavburlutskiy/Documents/Lambda/my-app/node_modules/fs-extra/lib/move-sync/move-sync.js:14:28)
at module.exports (/Users/vladislavburlutskiy/Documents/Lambda/my-app/node_modules/react-scripts/scripts/init.js:273:8)
at [eval]:3:14
at Script.runInThisContext (vm.js:133:18)
at Object.runInThisContext (vm.js:310:38) {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/Users/vladislavburlutskiy/Documents/Lambda/my-app/gitignore'
}
Aborting installation.
node has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
npm ERR! code 1
npm ERR! path /Users/vladislavburlutskiy/Documents/Lambda
npm ERR! command failed
npm ERR! command sh -c create-react-app "my-app" "--template" "astra"
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vladislavburlutskiy/.npm/_logs/2021-02-13T17_51_18_481Z-debug.log
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 like your template's idea, but I think you are creating confusion by using/mixing both SASSandstyled-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, the devDependencies not installed when I run the CRA command. After several minutes trying to solve, I found out that devDependencies 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.
We're a place where coders share, stay up-to-date and grow their careers.
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 like your template's idea, but I think you are creating confusion by using/mixing both
SASSandstyled-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
devDependenciesinside template.json. I also did the same. But, unfortunately, thedevDependenciesnot installed when I run the CRA command. After several minutes trying to solve, I found out thatdevDependenciesis 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.