{"id":2679,"date":"2022-08-08T15:43:14","date_gmt":"2022-08-08T15:43:14","guid":{"rendered":"https:\/\/salientsoft.co.uk\/?p=2679"},"modified":"2022-08-08T15:43:14","modified_gmt":"2022-08-08T15:43:14","slug":"batch-file-exits-after-running-npm-command","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=2679","title":{"rendered":"Batch file exits after running npm command"},"content":{"rendered":"\n<p>I created a simple batch file to run a number of npm build commands in succession.<\/p>\n<p>However, the file exited after running the first npm command. This appears to be a side effect of the way npm runs &#8211; when you run npm, you actually end up running npm.cmd, which exits after completing. This is detailed on StackOverflow <strong><a href=\"https:\/\/github.com\/npm\/npm\/issues\/2938\">here<\/a>.<\/strong><\/p>\n<p>A simple workaround as per the post is to prefix the npm commands with call &#8211; I did this and everything worked fine and all the builds were executed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I created a simple batch file to run a number of npm build commands in succession. However, the file exited after running the first npm command. This appears to be a side effect of the way npm runs &#8211; when you run npm, you actually end up running npm.cmd, which exits after completing. This is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,41,212,230,62],"tags":[40,16],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2679"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2679"}],"version-history":[{"count":1,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2679\/revisions"}],"predecessor-version":[{"id":2680,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2679\/revisions\/2680"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}