{"id":655,"date":"2014-08-22T09:41:45","date_gmt":"2014-08-22T09:41:45","guid":{"rendered":"http:\/\/www.nikola-breznjak.com\/blog\/?p=655"},"modified":"2015-09-08T09:04:21","modified_gmt":"2015-09-08T09:04:21","slug":"how-to-delete-node_modules-folder-on-windows-machine","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/javascript\/nodejs\/how-to-delete-node_modules-folder-on-windows-machine\/","title":{"rendered":"How to delete node_modules folder on Windows machine?"},"content":{"rendered":"<p>Due to its <em>folder nesting<\/em> Windows can&#8217;t delete the folder as its name is too long. To solve this, install <a href=\"https:\/\/github.com\/isaacs\/rimraf\">RimRaf<\/a>:<\/p>\n<pre class=\"lang:default decode:true\">npm install rimraf -g<\/pre>\n<p>and delete the node_modules folder easily with:<\/p>\n<pre class=\"lang:default decode:true\">rimraf node_modules<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>edit:<\/strong>\u00a0If you happen to get an &#8220;error&#8221; like this:<\/p>\n<pre class=\"lang:default decode:true \">C:\\Users\\Nikola\\Desktop&gt;npm install -g rimraf\r\nC:\\Users\\Nikola\\AppData\\Roaming\\npm\\rimraf -&gt; C:\\Users\\Nikola\\AppData\\Roaming\\npm\\node_modules\\rimraf\\bin.js\r\nnpm WARN unmet dependency C:\\Users\\Nikola\\AppData\\Roaming\\npm\\node_modules\\generator-ionic requires cordova@'^4.2.0' but will load\r\nnpm WARN unmet dependency C:\\Users\\Nikola\\AppData\\Roaming\\npm\\node_modules\\cordova,\r\nnpm WARN unmet dependency which is version 5.1.1\r\nnpm WARN unmet dependency C:\\Users\\Nikola\\AppData\\Roaming\\npm\\node_modules\\bower\\node_modules\\bower-registry-client requires request@'~2.51.0' but will load\r\nnpm WARN unmet dependency undefined,\r\nnpm WARN unmet dependency which is version undefined\r\nnpm WARN unmet dependency C:\\Users\\Nikola\\AppData\\Roaming\\npm\\node_modules\\bower\\node_modules\\fstream-ignore requires fstream@'^1.0.0' but will load\r\nnpm WARN unmet dependency undefined,\r\nnpm WARN unmet dependency which is version undefined\r\nnpm ERR! peerinvalid The package node-inspector does not satisfy its siblings' peerDependencies requirements!\r\nnpm ERR! peerinvalid Peer strong-cli@2.6.4 wants node-inspector@~0.7.0\r\n\r\nnpm ERR! System Windows_NT 6.1.7601\r\nnpm ERR! command \"C:\\\\NodeJS\\\\\\\\node.exe\" \"C:\\\\NodeJS\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\" \"install\" \"-g\" \"rimraf\"\r\nnpm ERR! cwd C:\\Users\\Nikola\\Desktop\r\nnpm ERR! node -v v0.10.36\r\nnpm ERR! npm -v 1.4.28\r\nnpm ERR! code EPEERINVALID\r\nnpm ERR!\r\nnpm ERR! Additional logging details can be found in:\r\nnpm ERR!     C:\\Users\\Nikola\\Desktop\\npm-debug.log\r\nnpm ERR! not ok code 0<\/pre>\n<p>Don&#8217;t panic :), just try to run <strong>rimraf<\/strong> instead, as noted above. In most cases, all will be okay and you&#8217;ll be able to use it without a problem. If not, head to the comments, and we&#8217;ll take care of it together! For those who don&#8217;t care much about comments, here&#8217;s the post in which I address this <a href=\"http:\/\/www.nikola-breznjak.com\/blog\/nodejs\/npm-err-peerinvalid-the-package-node-inspector-does-not-satisfy-its-siblings-peerdependencies-requirements\/\">node-inspector issue<\/a>.<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"550\">\n<p lang=\"en\" dir=\"ltr\">How to delete node_modules folder on Windows machine? <a href=\"http:\/\/t.co\/0pV4OSTG1L\">http:\/\/t.co\/0pV4OSTG1L<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/nodejs?src=hash\">#nodejs<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/windows?src=hash\">#windows<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/node_modules?src=hash\">#node_modules<\/a><\/p>\n<p>&mdash; Nikola Bre\u017enjak (@HitmanHR) <a href=\"https:\/\/twitter.com\/HitmanHR\/status\/626021351908843521\">July 28, 2015<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Due to its folder nesting Windows can&#8217;t delete the folder as its name is too long. To solve this, install RimRaf: npm install rimraf -g and delete the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":658,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,15],"tags":[],"class_list":["post-655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nodejs","category-quick-tips"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/comments?post=655"}],"version-history":[{"count":5,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/655\/revisions"}],"predecessor-version":[{"id":2190,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/655\/revisions\/2190"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/658"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}