{"id":29454,"date":"2021-03-01T12:54:07","date_gmt":"2021-03-01T20:54:07","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=29454"},"modified":"2021-03-01T12:54:18","modified_gmt":"2021-03-01T20:54:18","slug":"npm-error-missing-script","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/","title":{"rendered":"npm err! missing script: start Solution"},"content":{"rendered":"\n<p>If you have worked on JavaScript applications, you have seen and probably used Node.js. There are lots of tools in Node.js, and <a href=\"https:\/\/www.w3schools.com\/whatis\/whatis_npm.asp\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">npm<\/a> (node package manager) can help you manage them. npm installs the packages you want and provides a terminal interface so you can work with these tools and packages.&nbsp;<br><\/p>\n\n\n\n<p>You may get the <code>missing script: start<\/code> message if you recently updated to the newest version and tried to run npm start on your terminal. Or you may be running a command such as <em>node Filename.js <\/em>to run your file while not having a script for <code>start<\/code>. There could be other contributing factors.<br><\/p>\n\n\n\n<p>Whatever the case, you can follow the steps below to learn how to run <em>npm start<\/em> without incurring an error message.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the Cause of the npm err! missing script: start Error?<\/h2>\n\n\n\n<p>If you type <em>npm start<\/em> and get the <code>npm err! missing script: start<\/code> error, there must be a missing line in the script object located in your package.json file. The error also tells us that the missing content is in regards to the <code>start<\/code> command.\u00a0<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/LqgoxuY_tlEpSYjhYXGhsqKkezxRkXCxdKpRqd12kfb0-ZAV4yZNw6srMNywMXcr1jyEEyJfDPfQp2Bx5nonUTp3hPNrB1clOSMdr3kUnzLTYqluOmGECQbZzQa7cLqyY4aicRPn\" alt=\"\"\/><figcaption> <em> Screenshot of the error being thrown after running the npm start command.<\/em> <\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to Fix the Error Message<\/h2>\n\n\n\n<p>Let\u2019s go over some steps we can take to fix this error. We will go into our project\u2019s package.json file and add a <code>start<\/code> script to the file so we can use the npm start command.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>First, go into your package.json file by typing <em>npm init <\/em>in your terminal. You will be taken through the process of creating a package.json file. The utility will ask you a few basics, such as project name and starting file name. I have a file named \u201cApp.js\u201d I\u2019m working with, so I typed that in for the \u201centry point\u201d option. Choose the best options for you, and press <em>Enter<\/em> to accept the defaults.\u00a0<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/V9LtkmZGEarafXdc3NQuq2rRRI-KsXYvtHdzoLoIOL5vRu7nN2EjJ0ApYZLJrwTEn1bjcUptCgevPCFOzMzRheRdh_mxqX97KHuHAxvc9Nt3aEpCOd9sQ3wZtQIWuYFYQpk7ETde\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Now go to the location of the file and open it. The package.json file will be saved in the directory you are currently in inside your terminal. I was in my user directory (the same place where my \u201cApp.js\u201d file is) so I found the file there. Then, add a start script in the \u201cscripts\u201d object in your package.json file. This will help to help activate your npm start command.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/f6q5CztpOvaxImazGnQwLIFwX8iEsJw68pCNy0q25E7cPTfphLtlAkeEy4Im64pGPR8QqPXuWQNfjFyMb_1uU8TH3jPoq_3CvU8j38zenvjcApdmK7jXdRcq7RkuSUHwyVVlFbLo\" alt=\"\"\/><figcaption> <em>The script we added in Step 2\u00a0 is highlighted<\/em> <\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Finally, run <em>npm start<\/em> again. You should be able to run it successfully now!<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In this article, you learned how to fix a line in a file so that the npm start command works. As you saw, the error that was thrown at us was pretty descriptive\u2014there was a missing script regarding the <code>start<\/code> command!\u00a0<br><\/p>\n\n\n\n<p>In the solution we discussed, we went into our package.json file where our scripts live and added a start script. When you get an error, be sure to read the description for clues!<br><\/p>\n\n\n\n<p>If you want to learn more about npm, check out <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-npm\/\">this article<\/a> on the best resources to learn npm. Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"If you have worked on JavaScript applications, you have seen and probably used Node.js. There are lots of tools in Node.js, and npm (node package manager) can help you manage them. npm installs the packages you want and provides a terminal interface so you can work with these tools and packages.&nbsp; You may get the&hellip;","protected":false},"author":114,"featured_media":10878,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-29454","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-javascript"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"JavaScript","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>npm err! missing script: start<\/title>\n<meta name=\"description\" content=\"Want to adress the npm err! missing script: starterror? Read this guide on how to troubleshoot and fix this error.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"npm err! missing script: start Solution\" \/>\n<meta property=\"og:description\" content=\"Want to adress the npm err! missing script: starterror? Read this guide on how to troubleshoot and fix this error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-01T20:54:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-01T20:54:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"668\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Yessenia Mata\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yessenia Mata\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/\"},\"author\":{\"name\":\"Yessenia Mata\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3\"},\"headline\":\"npm err! missing script: start Solution\",\"datePublished\":\"2021-03-01T20:54:07+00:00\",\"dateModified\":\"2021-03-01T20:54:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/\"},\"wordCount\":509,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/\",\"name\":\"npm err! missing script: start\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg\",\"datePublished\":\"2021-03-01T20:54:07+00:00\",\"dateModified\":\"2021-03-01T20:54:18+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3\"},\"description\":\"Want to adress the npm err! missing script: starterror? Read this guide on how to troubleshoot and fix this error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg\",\"width\":1000,\"height\":668},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/careerkarma.com\/blog\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"npm err! missing script: start Solution\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3\",\"name\":\"Yessenia Mata\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/TD8SYPRGU-U01LTPHLWG2-ef37ec165b60-512-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/TD8SYPRGU-U01LTPHLWG2-ef37ec165b60-512-150x150.jpg\",\"caption\":\"Yessenia Mata\"},\"description\":\"Yessenia is a technical writer at Career Karma. In addition to contributing to Career Karma as a writer, Yessenia currently works in IT in the San Francisco Bay Area. She has experience with programming languages including Java, Python, HTML, CSS, and JavaScript and is double majoring in CNIT and Computer Science.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/yessenia-m\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"npm err! missing script: start","description":"Want to adress the npm err! missing script: starterror? Read this guide on how to troubleshoot and fix this error.","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:\/\/careerkarma.com\/blog\/npm-error-missing-script\/","og_locale":"en_US","og_type":"article","og_title":"npm err! missing script: start Solution","og_description":"Want to adress the npm err! missing script: starterror? Read this guide on how to troubleshoot and fix this error.","og_url":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2021-03-01T20:54:07+00:00","article_modified_time":"2021-03-01T20:54:18+00:00","og_image":[{"width":1000,"height":668,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg","type":"image\/jpeg"}],"author":"Yessenia Mata","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Yessenia Mata","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/"},"author":{"name":"Yessenia Mata","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3"},"headline":"npm err! missing script: start Solution","datePublished":"2021-03-01T20:54:07+00:00","dateModified":"2021-03-01T20:54:18+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/"},"wordCount":509,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/","url":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/","name":"npm err! missing script: start","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg","datePublished":"2021-03-01T20:54:07+00:00","dateModified":"2021-03-01T20:54:18+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3"},"description":"Want to adress the npm err! missing script: starterror? Read this guide on how to troubleshoot and fix this error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/two-women-looking-at-the-code-at-laptop-1181263.jpg","width":1000,"height":668},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/npm-error-missing-script\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/careerkarma.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"npm err! missing script: start Solution"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3","name":"Yessenia Mata","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/TD8SYPRGU-U01LTPHLWG2-ef37ec165b60-512-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/TD8SYPRGU-U01LTPHLWG2-ef37ec165b60-512-150x150.jpg","caption":"Yessenia Mata"},"description":"Yessenia is a technical writer at Career Karma. In addition to contributing to Career Karma as a writer, Yessenia currently works in IT in the San Francisco Bay Area. She has experience with programming languages including Java, Python, HTML, CSS, and JavaScript and is double majoring in CNIT and Computer Science.","url":"https:\/\/careerkarma.com\/blog\/author\/yessenia-m\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/29454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=29454"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/29454\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/10878"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=29454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=29454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=29454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}