{"id":6750,"date":"2023-10-16T17:23:24","date_gmt":"2023-10-16T11:53:24","guid":{"rendered":"https:\/\/sourcebae.com\/blog\/?p=6750"},"modified":"2025-10-06T14:35:24","modified_gmt":"2025-10-06T09:05:24","slug":"sh-react-scripts-command-not-found","status":"publish","type":"post","link":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/","title":{"rendered":"Sh React-Scripts Command Not Found"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What Is Sh React-Scripts Command Not Found?<\/h2>\n\n\n\n<p>The error message &#8220;sh: react-scripts: command not found&#8221; typically indicates that the &#8220;react-scripts&#8221; command, used to start a React application, is not recognized or cannot be found in the current environment. This can happen for several reasons, including if the &#8220;react-scripts&#8221; package is not installed or the command is executed in the wrong directory. To resolve this issue, you must ensure the &#8220;react-scripts&#8221; package is installed and accessible in the appropriate directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sh React-Scripts Command Not Found<\/h2>\n\n\n\n<p>The error &#8220;sh: react-scripts: command not found&#8221; typically occurs when the &#8220;react-scripts&#8221; package is not installed or cannot be found in the <a href=\"https:\/\/sourcebae.com\/blog\/find-the-current-directory-and-files-directory\/\">current directory<\/a>. Here are steps to troubleshoot and resolve the issue:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check if react-scripts is installed: <\/h2>\n\n\n\n<p>Ensure that the &#8220;react-scripts&#8221; package is installed in your project. You can do this by looking at the &#8220;dependencies&#8221; in your project&#8217;s &#8220;package.json&#8221; file or running the following command in your project directory: <code>npm ls react-scripts<br><\/code> If it&#8217;s not installed, install it using npm: <a href=\"https:\/\/sourcebae.com\/blog\/what-is-the-save-option-for-npm-install\/\">npm install<\/a> react-scripts<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check if the node_modules folder exists: <\/h2>\n\n\n\n<p>Ensure a &#8220;node_modules&#8221; folder is in your project directory. If it&#8217;s missing, run the following command to install all the project dependencies: <code>npm install<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check your PATH: <\/h2>\n\n\n\n<p>Verify that your system&#8217;s PATH includes the directory containing the &#8220;react-scripts&#8221; executable. You can add it to your PATH by modifying your shell&#8217;s configuration file (e.g., ~\/.bash_profile, ~\/.bashrc, or ~\/.zshrc) and adding the following line: <code>export PATH=\".\/node_modules\/.bin:$PATH\"<br><\/code> Please save the file and then source it or restart your terminal for the changes to take effect.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use npm scripts: <\/h2>\n\n\n\n<p>Instead of directly running &#8220;react-scripts&#8221; using &#8220;sh&#8221;, it&#8217;s better to use npm scripts defined in your &#8220;package.json&#8221; file. For example, if you have a script named &#8220;start&#8221; for starting your <a href=\"https:\/\/sourcebae.com\/blog\/top-16-react-ui-frameworks-to-build-applications\/\">React application<\/a>, use: <code>npm start<br><\/code> This will run the &#8220;start&#8221; script defined in your &#8220;package.json&#8221;, which usually runs &#8220;react-scripts start&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check if react-scripts is globally installed: <\/h2>\n\n\n\n<p>If you previously installed &#8220;react-scripts&#8221; globally, it might not be found when running it in a specific project directory. It&#8217;s recommended to install it locally within your project.<\/p>\n\n\n\n<p>Following these steps, you can resolve the &#8220;sh: react-scripts: command not found&#8221; error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What does the error &#8220;sh: react-scripts: command not found&#8221; mean?<\/strong><\/h3>\n\n\n\n<p>This error indicates that the &#8220;react-scripts&#8221; command, used to run a React application, cannot be found or recognized in the current environment. It suggests the necessary package or executable is missing or not correctly configured.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why am I seeing the &#8220;react-scripts: command not found&#8221; error?<\/strong><\/h3>\n\n\n\n<p>This error occurs when the &#8220;react-scripts&#8221; package is not installed in the project, the &#8220;node_modules&#8221; folder is missing or incomplete, or the &#8220;react-scripts&#8221; command is not accessible in the current directory or the system&#8217;s PATH.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How can I fix the &#8220;sh: react-scripts: command not found&#8221; error?<\/strong><\/h3>\n\n\n\n<p>To fix this error, you can start by ensuring that the &#8220;react-scripts&#8221; package is installed in your project using npm. Additionally, ensure the &#8220;node_modules&#8221; folder exists in the project directory and that your system&#8217;s PATH includes the appropriate path to the &#8220;react-scripts&#8221; executable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What if the &#8220;react-scripts&#8221; command is globally installed but still not found?<\/strong><\/h3>\n\n\n\n<p>If &#8220;react-scripts&#8221; was installed globally but is still not found when running the command, installing &#8220;react-scripts&#8221; locally in the specific project is recommended. This ensures the correct version is used and is accessible within the project&#8217;s environment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Can I use npm scripts to start my React application instead?<\/strong><\/h3>\n\n\n\n<p>Using npm scripts defined in your &#8220;package.json&#8221; file is good <a href=\"https:\/\/sourcebae.com\/blog\/what-are-the-best-practices-for-writing-react-js-code\/\">practice to start your React<\/a> application. Instead of running &#8220;react-scripts&#8221; directly, you can specify a script (e.g., &#8220;start&#8221;) in your &#8220;package.json&#8221; that runs &#8220;react-scripts start&#8221; and then use &#8220;npm start&#8221; to start your application. This avoids issues related to the direct invocation of &#8220;react-scripts.&#8221;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In conclusion, the &#8220;sh: react-scripts: command not found&#8221; error commonly arises when attempting to run a React application using the &#8220;react-scripts&#8221; command. However, the management or the necessary package is not accessible or recognized within the current environment. <\/p>\n\n\n\n<p>The error can be addressed by ensuring that the &#8220;react-scripts&#8221; package is correctly installed within the project, that the &#8220;node_modules&#8221; folder is present and complete, and that the appropriate path to the &#8220;react-scripts&#8221; executable is included in the system&#8217;s PATH. Installing &#8220;react-scripts&#8221; locally within the project is advisable to ensure the correct version is utilized. Additionally, using npm scripts defined in the &#8220;package.json&#8221; file for starting the React application is recommended to avoid direct invocation issues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What Is Sh React-Scripts Command Not Found? The error message &#8220;sh: react-scripts: command not found&#8221; typically indicates that the &#8220;react-scripts&#8221; command, used to start a React application, is not recognized or cannot be found in the current environment. This can happen for several reasons, including if the &#8220;react-scripts&#8221; package is not installed or the command [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":8900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,14],"tags":[2779,808],"class_list":["post-6750","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all","category-react","tag-sh-react-scripts","tag-sh-react-scripts-command-not-found"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Sh React-Scripts Command Not Found - SourceBae<\/title>\n<meta name=\"description\" content=\"Troubleshooting &quot;sh react-scripts command not found&quot;? Learn quick fixes to resolve errors and run your React app smoothly without waste time.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sh React-Scripts Command Not Found - SourceBae\" \/>\n<meta property=\"og:description\" content=\"Troubleshooting &quot;sh react-scripts command not found&quot;? Learn quick fixes to resolve errors and run your React app smoothly without waste time.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/\" \/>\n<meta property=\"og:site_name\" content=\"SourceBae\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-16T11:53:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-06T09:05:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sourcebae.com\/blog\/wp-content\/uploads\/2023\/10\/Add-a-heading-4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1240\" \/>\n\t<meta property=\"og:image:height\" content=\"620\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Priyanshu Pathak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Priyanshu Pathak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/\",\"url\":\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/\",\"name\":\"Sh React-Scripts Command Not Found - SourceBae\",\"isPartOf\":{\"@id\":\"https:\/\/sourcebae.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/sourcebae.com\/blog\/wp-content\/uploads\/2023\/10\/Add-a-heading-4.jpg\",\"datePublished\":\"2023-10-16T11:53:24+00:00\",\"dateModified\":\"2025-10-06T09:05:24+00:00\",\"author\":{\"@id\":\"https:\/\/sourcebae.com\/blog\/#\/schema\/person\/73a46422e4aa329800c79033bb786b14\"},\"description\":\"Troubleshooting \\\"sh react-scripts command not found\\\"? Learn quick fixes to resolve errors and run your React app smoothly without waste time.\",\"breadcrumb\":{\"@id\":\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#primaryimage\",\"url\":\"https:\/\/sourcebae.com\/blog\/wp-content\/uploads\/2023\/10\/Add-a-heading-4.jpg\",\"contentUrl\":\"https:\/\/sourcebae.com\/blog\/wp-content\/uploads\/2023\/10\/Add-a-heading-4.jpg\",\"width\":1240,\"height\":620,\"caption\":\"Sh React-Scripts Command Not Found\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/sourcebae.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sh React-Scripts Command Not Found\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/sourcebae.com\/blog\/#website\",\"url\":\"https:\/\/sourcebae.com\/blog\/\",\"name\":\"SourceBae\",\"description\":\"Creative Blog Website\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/sourcebae.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/sourcebae.com\/blog\/#\/schema\/person\/73a46422e4aa329800c79033bb786b14\",\"name\":\"Priyanshu Pathak\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sourcebae.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc14902525055d47f414b0d28a1c668638de01414b85a9a178bc54785a53d5de?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc14902525055d47f414b0d28a1c668638de01414b85a9a178bc54785a53d5de?s=96&d=mm&r=g\",\"caption\":\"Priyanshu Pathak\"},\"sameAs\":[\"https:\/\/sourcebae.com\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sh React-Scripts Command Not Found - SourceBae","description":"Troubleshooting \"sh react-scripts command not found\"? Learn quick fixes to resolve errors and run your React app smoothly without waste time.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/","og_locale":"en_US","og_type":"article","og_title":"Sh React-Scripts Command Not Found - SourceBae","og_description":"Troubleshooting \"sh react-scripts command not found\"? Learn quick fixes to resolve errors and run your React app smoothly without waste time.","og_url":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/","og_site_name":"SourceBae","article_published_time":"2023-10-16T11:53:24+00:00","article_modified_time":"2025-10-06T09:05:24+00:00","og_image":[{"width":1240,"height":620,"url":"https:\/\/sourcebae.com\/blog\/wp-content\/uploads\/2023\/10\/Add-a-heading-4.jpg","type":"image\/jpeg"}],"author":"Priyanshu Pathak","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Priyanshu Pathak","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/","url":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/","name":"Sh React-Scripts Command Not Found - SourceBae","isPartOf":{"@id":"https:\/\/sourcebae.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#primaryimage"},"image":{"@id":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#primaryimage"},"thumbnailUrl":"https:\/\/sourcebae.com\/blog\/wp-content\/uploads\/2023\/10\/Add-a-heading-4.jpg","datePublished":"2023-10-16T11:53:24+00:00","dateModified":"2025-10-06T09:05:24+00:00","author":{"@id":"https:\/\/sourcebae.com\/blog\/#\/schema\/person\/73a46422e4aa329800c79033bb786b14"},"description":"Troubleshooting \"sh react-scripts command not found\"? Learn quick fixes to resolve errors and run your React app smoothly without waste time.","breadcrumb":{"@id":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#primaryimage","url":"https:\/\/sourcebae.com\/blog\/wp-content\/uploads\/2023\/10\/Add-a-heading-4.jpg","contentUrl":"https:\/\/sourcebae.com\/blog\/wp-content\/uploads\/2023\/10\/Add-a-heading-4.jpg","width":1240,"height":620,"caption":"Sh React-Scripts Command Not Found"},{"@type":"BreadcrumbList","@id":"https:\/\/sourcebae.com\/blog\/sh-react-scripts-command-not-found\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sourcebae.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Sh React-Scripts Command Not Found"}]},{"@type":"WebSite","@id":"https:\/\/sourcebae.com\/blog\/#website","url":"https:\/\/sourcebae.com\/blog\/","name":"SourceBae","description":"Creative Blog Website","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sourcebae.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/sourcebae.com\/blog\/#\/schema\/person\/73a46422e4aa329800c79033bb786b14","name":"Priyanshu Pathak","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sourcebae.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc14902525055d47f414b0d28a1c668638de01414b85a9a178bc54785a53d5de?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc14902525055d47f414b0d28a1c668638de01414b85a9a178bc54785a53d5de?s=96&d=mm&r=g","caption":"Priyanshu Pathak"},"sameAs":["https:\/\/sourcebae.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/posts\/6750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/comments?post=6750"}],"version-history":[{"count":4,"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/posts\/6750\/revisions"}],"predecessor-version":[{"id":13555,"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/posts\/6750\/revisions\/13555"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/media\/8900"}],"wp:attachment":[{"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/media?parent=6750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/categories?post=6750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sourcebae.com\/blog\/wp-json\/wp\/v2\/tags?post=6750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}