\u5728 windows \u4e2d\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u6253\u5f00 cmd \uff0c\u7136\u540e\u6267\u884c\u547d\u4ee4<\/p>\n
npm install -g npm-windows-upgrade<\/pre>\n\u5982\u679c\u63d0\u793a npm \u547d\u4ee4\u672a\u627e\u5230\uff0c\u5219\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u66f4\u6539\u811a\u672c\u7b56\u7565\u3002<\/p>\n
set-ExecutionPolicy RemoteSigned<\/pre>\n\u6267\u884c npm \u66f4\u65b0\u547d\u4ee4\uff0c\u9009\u62e9\u6700\u65b0\u7684\u7248\u672c\u56de\u8f66<\/p>\n
npm-windows-upgrade<\/pre>\n\u770b\u5230\u5982\u4e0b\u5185\u5bb9\u8bf4\u660e\u5347\u7ea7\u5b8c\u6210<\/p>\n
C:\\windows\\system32>npm-windows-upgrade\r\nnpm-windows-upgrade v6.0.1\r\n? Which version do you want to install? 8.12.1\r\nChecked system for npm installation:\r\nAccording to PowerShell: D:\\nodejs\r\nAccording to npm: D:\\nodejs\r\nDecided that npm is installed in D:\\nodejs\r\nUpgrading npm... -\r\nUpgrade finished. Your new npm version is 8.12.1. Have a nice day!\r\nC:\\windows\\system32>npm -v\r\n8.12.1<\/pre>\n\u518d\u6b21\u6267\u884c npm -v \u547d\u4ee4\uff0c\u53d1\u73b0\u6ca1\u6709\u4e86 WARN\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u4f7f\u7528 nvm \u5347\u7ea7 node \u7248\u672c\uff0c\u4ece v12.5.0 \u5347\u7ea7\u5230 v16.15.1\uff0c\u5347\u7ea7\u5b8c\u6210\u540e\uff0c\u4f7f\u7528 npm \u547d […]<\/p>\n","protected":false},"author":668,"featured_media":98456,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-246564","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/246564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/668"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=246564"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/246564\/revisions"}],"predecessor-version":[{"id":246568,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/246564\/revisions\/246568"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/98456"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=246564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=246564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=246564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}