{"id":2493,"date":"2016-10-19T20:40:51","date_gmt":"2016-10-19T19:40:51","guid":{"rendered":"http:\/\/www.nivas.hr\/blog\/?p=2493"},"modified":"2016-10-19T21:08:53","modified_gmt":"2016-10-19T20:08:53","slug":"delete-node_modules-dir-in-windows","status":"publish","type":"post","link":"https:\/\/www.nivas.hr\/blog\/2016\/10\/19\/delete-node_modules-dir-in-windows\/","title":{"rendered":"Delete node_modules dir in Windows"},"content":{"rendered":"<p>You are a happy Windows user. You have just upgraded your nodejs (if you can) and now you have to delete local \/node_modules directory to install brand new packages. Problems?<\/p>\n<blockquote><p>The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters<\/p><\/blockquote>\n<p>Yes, Windows can&#8217;t delete this directory because of the limitations in system. What now?\u00a0Don&#8217;t worry, NPM comes to the rescue.<\/p>\n<p>Just install Node package rimraf.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&gt; npm install rimraf -g\r\n<\/pre>\n<p>Move to direcotry above node_modules and execute.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&gt; rimraf node_modules\r\n<\/pre>\n<p><a href=\"http:\/\/www.nivas.hr\/blog\/wp-content\/uploads\/2016\/10\/4466041.jpg\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2499\" src=\"http:\/\/www.nivas.hr\/blog\/wp-content\/uploads\/2016\/10\/4466041.jpg\" alt=\"4466041\" width=\"401\" height=\"400\" srcset=\"https:\/\/www.nivas.hr\/blog\/wp-content\/uploads\/2016\/10\/4466041.jpg 401w, https:\/\/www.nivas.hr\/blog\/wp-content\/uploads\/2016\/10\/4466041-150x150.jpg 150w\" sizes=\"(max-width: 401px) 100vw, 401px\" \/><\/a><\/p>\n<p>Tell me how it goes :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You are a happy Windows user. You have just upgraded your nodejs (if you can) and now you have to delete local \/node_modules directory to install brand new packages. Problems? The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name&#8230;<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18,41],"tags":[],"_links":{"self":[{"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/posts\/2493"}],"collection":[{"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/comments?post=2493"}],"version-history":[{"count":7,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/posts\/2493\/revisions"}],"predecessor-version":[{"id":2503,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/posts\/2493\/revisions\/2503"}],"wp:attachment":[{"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/media?parent=2493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/categories?post=2493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/tags?post=2493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}