By ibrahim
first of all, im making a retail website using react. I have almost everything down to complete the website in terms of coding. i shifted all my files over to the droplet (if its important to know how or what way i used, then ask me). Now, there’s a server and a client folder that i use to run the website.
But theres a problem when i run the client…this shows up in the droplet:
"root@snagged-it:~/snagged-it/snagged-it# npm start
snagged-it@0.1.0 start
react-scripts start
sh: 1: react-scripts: not found"
snagged-it is just the name of my client folder. ive been trying to figure out the solution to this for so long, im hoping someone has the answer.
heres the link to the code: www.digitalocean.com all my files are in the “snagged-it/src” folder. snagged-it is my client folder, while index.js is in my server folder.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
The issue you’re encountering is that react-scripts
(and likely other dependencies) aren’t installed on your DigitalOcean droplet. When you transferred your files over, you probably copied the source code but not the node_modules
directory, which contains all the installed packages.
Try to run
npm install
while in your app’s folder
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.