{"id":2320,"date":"2015-10-17T12:20:43","date_gmt":"2015-10-17T10:20:43","guid":{"rendered":"https:\/\/adrhc.go.ro\/wordpress\/?p=2320"},"modified":"2018-12-15T20:16:07","modified_gmt":"2018-12-15T18:16:07","slug":"npm","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/npm\/","title":{"rendered":"npm"},"content":{"rendered":"<pre>\r\n<strong>show npm configuration<\/strong>\r\n<code>npm config list\r\nnpm config ls -l -> to show all defaults<\/code>\r\n\r\n<strong>outdated packages<\/strong>\r\nlisting global outdated packages\r\n<code>npm outdated -g --depth=0<\/code>\r\nupdate packages named n respectivelly npm\r\n<code>sudo npm update -g n npm<\/code>\r\n\r\n<strong>show npm cache data directory<\/strong>\r\n<code>npm config get cache<\/code>\r\n\r\n<strong>npm cache list, clean<\/strong>\r\n<code>npm cache ls\r\nnpm cache clean<\/code>\r\n\r\n<strong>print golbal npm path<\/strong>\r\n<code>npm root -g<\/code>\r\n<em>\/usr\/local\/lib\/node_modules<\/em>\r\n<code>npm --help<\/code>\r\n<em>... npm@4.0.5 \/usr\/local\/lib\/node_modules\/npm<\/em>\r\n\r\n<strong>list local node modules (project\/node_modules)<\/strong>\r\n<code>npm ls --depth=0<\/code>\r\n\r\n<strong>list global node modules (\/usr\/lib\/node_modules)<\/strong>\r\nshowing install paths\r\n<code>npm ls -gp --depth=0<\/code>\r\nshowing install version\r\n<code>npm ls -g --depth=0<\/code>\r\n\r\n<strong>install global package, specific version<\/strong>\r\n<code>sudo npm install -g webpack@2.2.0-rc.4<\/code>\r\n\r\n<strong>uninstall global package (don't specify the version)<\/strong>\r\n<code>sudo npm uninstall -g -verbose webpack-dev-server<\/code>\r\n\r\n<a href=\"https:\/\/npmsearch.com\/\" rel=\"noopener\" target=\"_blank\">https:\/\/npmsearch.com\/<\/a>\r\n<a href=\"https:\/\/docs.npmjs.com\/cli\/search\" rel=\"noopener\" target=\"_blank\">https:\/\/docs.npmjs.com\/cli\/search<\/a>\r\nn<code>pm search angular-in-memory-web-api<\/code>\r\n\r\n<strong>show the dependencies of the typings package at version 1.4.0 (or just check its package.json file)<\/strong>\r\n<code>npm view typings@1.4.0 dependencies<\/code>\r\n\r\n<strong>repair the npm cache<\/strong>\r\n<code>npm cache verify<\/code>\r\n\r\n<strong>ERROR<\/strong>\r\n\tnpm WARN retry will retry, error on last attempt: Error: certificate has expired\r\n\tnpm ERR! code CERT_HAS_EXPIRED\r\n<strong>SOLUTION<\/strong>\r\n\tnpm config set strict-ssl false\r\n\r\n<strong>COMMAND<\/strong>\r\n\t<code>sudo npm install -g node-sass@^4.0.0<\/code>\r\n<strong>ERROR<\/strong>\r\n\tUnable to save binary \/usr\/local\/lib\/node_modules\/node-sass\/vendor\/linux-x64-51 : { Error: EACCES: permission denied, mkdir '\/usr\/local\/lib\/node_modules\/node-sass\/vendor\r\n<strong>SOLUTION<\/strong>\r\n\t<code>sudo npm install -g node-sass@^4.0.0 --unsafe-perm=true --allow-root<\/code>\r\n\r\n<strong>details about the package<\/strong>\r\nnpm info openlayers\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>show npm configuration npm config list npm config ls -l -> to show all defaults outdated packages listing global outdated packages npm outdated -g &#8211;depth=0 update packages named n respectivelly npm sudo npm update -g n npm show npm cache [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/npm\/#more-2320\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">npm<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,10],"tags":[],"class_list":["post-2320","post","type-post","status-publish","format-standard","hentry","category-commands","category-programming"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/2320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=2320"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/2320\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=2320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=2320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=2320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}