R
Railway14mo ago
bbuhha

react-scripts: Permission denied

I'm trying to mark up the frontend on react.js, but it doesn't work. Writes an error. Project ID: 615a9a32-a94f-438e-9fce-72b1ab1fc582 GitHub: https://github.com/Buhancev/web_tech_frontend/
GitHub
GitHub - Buhancev/web_tech_frontend
Contribute to Buhancev/web_tech_frontend development by creating an account on GitHub.
32 Replies
Percy
Percy14mo ago
Project ID: 615a9a32-a94f-438e-9fce-72b1ab1fc582
bbuhha
bbuhha14mo ago
Brody
Brody14mo ago
let me write you a little guide on how to get this running on railway, give me a few minutes please remove the github repo from your service temporally, as you will be making a bunch of changes and don't need railway trying to keep building until youre done. in the service settings for this project click the X on the source repo. delete the node_modules and build folders from your github repo. add the contents of this link https://raw.githubusercontent.com/brody192/create-react-app-starter/main/.gitignore to your own .gitignore file in the root of your project. in your projects package.json file rename the start script to dev. add a start script with the value of serve build -s -n -L -p $PORT. run npm i serve to install serve into your project. in railway, set a service variable CI = false. make sure all changes have been committed to the repo and come tell me, i will review the changes and advice on the next steps
bbuhha
bbuhha14mo ago
I'm new to React.js, it's my friend's project. I didn't quite understand what needs to be changed in package.json. Is it right?
Brody
Brody14mo ago
you have a space after the word start, but yes that is correct
bbuhha
bbuhha14mo ago
I did it
Brody
Brody14mo ago
i remeber telling you to remove your repo from the service you have skipped steps
bbuhha
bbuhha14mo ago
Yes, I deleted it, changed everything, pushed it to the repository and now added it again. Oh, you said something else needed to be done, right?
Brody
Brody14mo ago
remove the repo from the service and work though ALL the steps
bbuhha
bbuhha14mo ago
I'm sorry, but I did all of them
Brody
Brody14mo ago
you did not remove the repo from the service and work though ALL the steps
bbuhha
bbuhha14mo ago
I'm sorry, is it ok?
Brody
Brody14mo ago
you do have serve installed, you are good there let me repeat myself delete the node_modules and build folders from your github repo. add the contents of this link https://raw.githubusercontent.com/brody192/create-react-app-starter/main/.gitignore to your own .gitignore file in the root of your project.
bbuhha
bbuhha14mo ago
Yes, I'm sorry, I removed build and node_modules, but they were added to repo again, for some reason gitignore missed them. I'll try it again!
Brody
Brody14mo ago
did you use my .gitignore file?
bbuhha
bbuhha14mo ago
Yes!
Brody
Brody14mo ago
no you did not
bbuhha
bbuhha14mo ago
Brody
Brody14mo ago
you have not used my .gitignore file okay now you have remove the build and node_modules folders
bbuhha
bbuhha14mo ago
Next steps?
Brody
Brody14mo ago
un cache them, however it works, you just never want to be committing those folders make sure those folders wont ever get committed in the future
bbuhha
bbuhha14mo ago
Are there any other advices from you?
Brody
Brody14mo ago
do you have any build or start commands defined in the service settings?
bbuhha
bbuhha14mo ago
Only that, but I'm not sure what you meant to add CI=false here
Brody
Brody14mo ago
no, that should not be a shared variable, remove it from the shared variable and add it to the service variables only
bbuhha
bbuhha14mo ago
Brody
Brody14mo ago
show me your service variables
bbuhha
bbuhha14mo ago
I'm confused. First, here are my variables. Secondly, now everything has started! But I didn't change anything, I just waited! And everything works perfectly!
bbuhha
bbuhha14mo ago
Thank you very much!!!)
Brody
Brody14mo ago
yo what kind of chocolate bar is that
bbuhha
bbuhha14mo ago
These are glazed curds !) Very tasty! I advise you to try it))
Brody
Brody14mo ago
very cool