R

Railway

βœ‹ο½œhelp

Join Server

react-scripts: Permission denied

Bbbuhha5/18/2023
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/
Bbbuhha5/18/2023
Bbrody5/18/2023
let me write you a little guide on how to get this running on railway, give me a few minutes please
Bbrody5/18/2023
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
Bbbuhha5/18/2023
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?
Bbrody5/18/2023
you have a space after the word start, but yes that is correct
Bbbuhha5/18/2023
I did it
Bbrody5/18/2023
i remeber telling you to remove your repo from the service
Bbrody5/18/2023
you have skipped steps
Bbbuhha5/18/2023
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?
Bbrody5/18/2023
remove the repo from the service and work though ALL the steps
Bbbuhha5/18/2023
I'm sorry, but I did all of them
Bbrody5/18/2023
you did not
Bbrody5/18/2023
remove the repo from the service and work though ALL the steps
Bbbuhha5/18/2023
I'm sorry, is it ok?
Bbrody5/18/2023
you do have serve installed, you are good there
Bbrody5/18/2023
let me repeat myself
Bbrody5/18/2023
delete the node_modules and build folders from your github repo.
Bbrody5/18/2023
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.
Bbbuhha5/18/2023
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!
Bbrody5/18/2023
did you use my .gitignore file?
Bbbuhha5/18/2023
Yes!
Bbrody5/18/2023
no you did not
Bbbuhha5/18/2023
Bbrody5/18/2023
you have not used my .gitignore file
Bbrody5/18/2023
okay now you have
Bbrody5/18/2023
remove the build and node_modules folders
Bbbuhha5/18/2023
Next steps?
Bbrody5/18/2023
un cache them, however it works, you just never want to be committing those folders
Bbrody5/18/2023
make sure those folders wont ever get committed in the future
Bbbuhha5/18/2023
Are there any other advices from you?
Bbrody5/18/2023
do you have any build or start commands defined in the service settings?
Bbbuhha5/18/2023
Only that, but I'm not sure what you meant to add CI=false here
Bbrody5/18/2023
no, that should not be a shared variable, remove it from the shared variable and add it to the service variables only
Bbbuhha5/18/2023
Bbrody5/18/2023
show me your service variables
Bbbuhha5/18/2023
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!
Bbbuhha5/18/2023
Thank you very much!!!)
Bbrody5/18/2023
yo what kind of chocolate bar is that
Bbbuhha5/18/2023
These are glazed curds !) Very tasty! I advise you to try it))
Bbrody5/18/2023
very cool