{"id":39515,"date":"2023-08-15T04:28:52","date_gmt":"2023-01-13T19:49:36","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/"},"modified":"2024-04-30T18:36:33","modified_gmt":"2024-04-30T10:36:33","slug":"%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/","title":{"rendered":"\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5"},"content":{"rendered":"<h2>\u7b80\u8981\u6982\u8ff0<\/h2>\n<p>\u5728\u8fdb\u884c\u5168\u5c40\u5b89\u88c5npm\u65f6\uff0c\u5982\u679c\u9047\u5230\u5b89\u88c5\u5931\u8d25\u7684\u9519\u8bef\uff0c\u4ee5\u4e0b\u662f\u89e3\u51b3\u65b9\u6cd5\u7684\u5907\u5fd8\u5f55\u3002<\/p>\n<p>\u5f53\u5728\u8fd0\u884c&#8221;npm install -g @angular\/cli&#8221;\u547d\u4ee4\u65f6\u9047\u5230\u9519\u8bef\u5e76\u4e14\u65e0\u6cd5\u6b63\u5e38\u5b8c\u6210\u65f6\uff0c\u6211\u4eec\u89e3\u51b3\u4e86\u6743\u9650\u95ee\u9898\uff0c\u6210\u529f\u5730\u5b89\u88c5\u4e86\u8be5\u8f6f\u4ef6\u3002<\/p>\n<h2>\u524d\u63d0 &#8211; \u8fd9\u662f\u5728\u8ba8\u8bba\u4e4b\u524d\u5fc5\u987b\u5148\u786e\u5b9a\u7684\u6761\u4ef6\u3002<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Node.js \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u7b46\u8005\u306e\u74b0\u5883<\/ul>\n<\/li>\n<\/ul>\n<p>macOS 10.15.7 Catalina<br \/>\nNode.js v14.16.1<br \/>\nnpm v6.14.12<\/p>\n<h2>\u4e8b\u4ef6<\/h2>\n<p>\u5728\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u65f6\uff0c\u5c1d\u8bd5\u4f7f\u7528npm\u5168\u5c40\u5b89\u88c5&#8221;Angular CLI&#8221;\u65f6\u7684\u60c5\u51b5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c\"># -g \u306e\u5f8c\u308d\u306f\u4f55\u3067\u3082\u826f\u3044\u304c\u3001\u4eca\u56de\u306f\u5b9f\u4f8b\u3068\u3057\u3066\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span>\r\nnpm <span class=\"nb\">install<\/span> <span class=\"nt\">-g<\/span> @angular\/cli\r\n<\/code><\/pre>\n<p>\u7136\u540e\uff0c\u53d1\u751f\u4e86\u4ee5\u4e0b\u9519\u8bef\u3002<\/p>\n<pre class=\"post-pre\"><code>npm WARN deprecated request@2.88.2: request has been deprecated, see https:\/\/github.com\/request\/request\/issues\/3142\r\nnpm WARN deprecated har-validator@5.1.5: this library is no longer supported\r\nnpm WARN checkPermissions Missing write access to \/usr\/local\/lib\/node_modules\r\nnpm ERR! code EACCES\r\nnpm ERR! syscall access\r\nnpm ERR! path \/usr\/local\/lib\/node_modules\r\nnpm ERR! errno -13\r\nnpm ERR! Error: EACCES: permission denied, access '\/usr\/local\/lib\/node_modules'\r\nnpm ERR!  [Error: EACCES: permission denied, access '\/usr\/local\/lib\/node_modules'] {\r\nnpm ERR!   errno: -13,\r\nnpm ERR!   code: 'EACCES',\r\nnpm ERR!   syscall: 'access',\r\nnpm ERR!   path: '\/usr\/local\/lib\/node_modules'\r\nnpm ERR! }\r\nnpm ERR! \r\nnpm ERR! The operation was rejected by your operating system.\r\nnpm ERR! It is likely you do not have the permissions to access this file as the current user\r\nnpm ERR! \r\nnpm ERR! If you believe this might be a permissions issue, please double-check the\r\nnpm ERR! permissions of the file and its containing directories, or try running\r\nnpm ERR! the command again as root\/Administrator.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     \/Users\/{\u30e6\u30fc\u30b6\u540d}\/.npm\/_logs\/2021-04-08T17_35_24_683Z-debug.log\r\n<\/code><\/pre>\n<p>\u2192 \u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u4f3c\u4e4e\u88ab\u62d2\u7edd\u8bbf\u95ee\u67d0\u4e9b\u76ee\u5f55\u7684\u8bbf\u95ee\u6743\u9650\u3002<br \/>\n\u65e0\u6cd5\u5199\u5165 \/usr\/local\/lib\/node_modules\u3002<\/p>\n<h2>Only need one option.<\/h2>\n<p>\u7531\u4e8e\u7279\u5b9a\u76ee\u5f55\u7f3a\u4e4f\u6743\u9650\u7684\u539f\u56e0\u3002<\/p>\n<h2>\u89e3\u51b3\u65b9\u6848<\/h2>\n<p>\u6709\u4e24\u4e2a\u89e3\u51b3\u65b9\u6cd5\uff1a<br \/>\n1. \u5728\u5b89\u88c5\u547d\u4ee4\u524d\u9762\u52a0\u4e0a\u201csudo\u201d\u8fdb\u884c\u5b89\u88c5\u3002<br \/>\n2. \u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u4f7f\u7528sudo\u3002<\/p>\n<pre class=\"post-pre\"><code>sudo npm install -g @angular\/cli\r\n<\/code><\/pre>\n<p>\u5c06\u6307\u5b9a\u76ee\u5f55\u7684\u6240\u6709\u8005\u66f4\u6539\u4e3a\u5f53\u524d\u7528\u6237\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c\"># \/usr\/local\/ \u4ee5\u4e0b\u306e lib\/node_modules, bin, share \u306e\u30aa\u30fc\u30ca\u30fc\u3092\u73fe\u5728\u306e\u30e6\u30fc\u30b6\u306b\u5909\u66f4<\/span>\r\n<span class=\"nb\">sudo chown<\/span> <span class=\"nt\">-R<\/span> <span class=\"si\">$(<\/span><span class=\"nb\">whoami<\/span><span class=\"si\">)<\/span> <span class=\"si\">$(<\/span>npm config get prefix<span class=\"si\">)<\/span>\/<span class=\"o\">{<\/span>lib\/node_modules,bin,share<span class=\"o\">}<\/span>\r\n<\/code><\/pre>\n<p>\u65e0\u8bba\u9009\u54ea\u4e2a\u90fd\u53ef\u4ee5\uff0c\u4f46\u5982\u679c\u6bcf\u6b21\u63a5\u89e6\u5168\u7403\u5305\u90fd\u8981\u52a0\u4e0a\u201csudo\u201d\u611f\u5230\u62b5\u89e6\u7684\u8bdd\u2777\uff0c\u5c31\u4e0d\u5fc5\u5728\u610f\u8fd9\u4e2a\u4e86\uff0c\u6216\u8005\u5982\u679c\u4e0d\u592a\u6e05\u695a\u7684\u8bdd\uff0c\u73b0\u5728\u5e94\u8be5\u53ef\u4ee5\u9009\u62e9\u2776\u3002<\/p>\n<h2>\u7ed3\u679c = ji\u00e9 gu\u01d2<\/h2>\n<p>\u6211\u5c1d\u8bd5\u91cd\u65b0\u5b89\u88c5\u4e86\u4e00\u6b21\u3002<\/p>\n<pre class=\"post-pre\"><code>npm WARN deprecated request@2.88.2: request has been deprecated, see https:\/\/github.com\/request\/request\/issues\/3142\r\nnpm WARN deprecated har-validator@5.1.5: this library is no longer supported\r\n\/usr\/local\/bin\/ng -&gt; \/usr\/local\/lib\/node_modules\/@angular\/cli\/bin\/ng\r\n\r\n&gt; @angular\/cli@11.2.8 postinstall \/usr\/local\/lib\/node_modules\/@angular\/cli\r\n&gt; node .\/bin\/postinstall\/script.js\r\n\r\n+ @angular\/cli@11.2.8\r\nupdated 1 package in 4.667s\r\n<\/code><\/pre>\n<p>\u867d\u7136\u6709\u4e9b\u8b66\u544a\uff0c\u4f46\u662f\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<h2>\u6dfb\u52a0\u6216\u586b\u88dc\u6240\u7f3a\u4e4f\u7684\u90e8\u5206\u3002<\/h2>\n<p>\u5982\u679c\u9009\u62e9\u4f7f\u7528\u300c\u89e3\u51b3\u7b562\u300d\u8fdb\u884c\u5904\u7406\uff0c<br \/>\n\u4e00\u5f00\u59cb\u6211\u5c1d\u8bd5\u4e86\u7eaf\u7cb9\u5730\u7ed9\u4e88 \/usr\/local\/lib\/node_modules \u76ee\u5f55\u4e0b\u7684\u4ee5\u4e0b\u547d\u4ee4\u6743\u9650\uff0c\u4f46\u662f\u3001\u3001\u3001<\/p>\n<pre class=\"post-pre\"><code>sudo chown -R $USER \/usr\/local\/lib\/node_modules\r\n<\/code><\/pre>\n<p>\u7136\u800c\uff0c\u5f53\u6211\u91cd\u65b0\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u540e\uff0c\u53d1\u751f\u4e86\u4ee5\u4e0b\u60c5\u51b5\uff0c\u8fd9\u4e00\u6b21\u751a\u81f3\u5728\u5176\u4ed6\u76ee\u5f55\u4e5f\u65e0\u6cd5\u8bbf\u95ee\u3002<\/p>\n<pre class=\"post-pre\"><code>npm ERR! code EACCES\r\nnpm ERR! syscall symlink\r\nnpm ERR! path ..\/lib\/node_modules\/@angular\/cli\/bin\/ng\r\nnpm ERR! dest \/usr\/local\/bin\/ng\r\nnpm ERR! errno -13\r\nnpm ERR! Error: EACCES: permission denied, symlink '..\/lib\/node_modules\/@angular\/cli\/bin\/ng' -&gt; '\/usr\/local\/bin\/ng'\r\nnpm ERR!  [OperationalError: EACCES: permission denied, symlink '..\/lib\/node_modules\/@angular\/cli\/bin\/ng' -&gt; '\/usr\/local\/bin\/ng'] {\r\nnpm ERR!   cause: [Error: EACCES: permission denied, symlink '..\/lib\/node_modules\/@angular\/cli\/bin\/ng' -&gt; '\/usr\/local\/bin\/ng'] {\r\nnpm ERR!     errno: -13,\r\nnpm ERR!     code: 'EACCES',\r\nnpm ERR!     syscall: 'symlink',\r\nnpm ERR!     path: '..\/lib\/node_modules\/@angular\/cli\/bin\/ng',\r\nnpm ERR!     dest: '\/usr\/local\/bin\/ng'\r\nnpm ERR!   },\r\nnpm ERR!   errno: -13,\r\nnpm ERR!   code: 'EACCES',\r\nnpm ERR!   syscall: 'symlink',\r\nnpm ERR!   path: '..\/lib\/node_modules\/@angular\/cli\/bin\/ng',\r\nnpm ERR!   dest: '\/usr\/local\/bin\/ng'\r\nnpm ERR! }\r\n<\/code><\/pre>\n<p>\u6240\u4ee5\uff0c\u6211\u6ce8\u610f\u5230\u5982\u679c\u4e0d\u7ed9\u4e88\/usr\/local\/\u76ee\u5f55\u4e0b\u7684\u5176\u4ed6\u76ee\u5f55\u6743\u9650\uff0c\u9519\u8bef\u5c31\u65e0\u6cd5\u89e3\u51b3\uff0c\u7136\u540e\u5f97\u5230\u4e86\u4e0a\u8ff0\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u8981\u6982\u8ff0 \u5728\u8fdb\u884c\u5168\u5c40\u5b89\u88c5npm\u65f6\uff0c\u5982\u679c\u9047\u5230\u5b89\u88c5\u5931\u8d25\u7684\u9519\u8bef\uff0c\u4ee5\u4e0b\u662f\u89e3\u51b3\u65b9\u6cd5\u7684\u5907\u5fd8\u5f55\u3002 \u5f53\u5728\u8fd0\u884c&#8221;np [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-39515","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5f53\u4f7f\u7528-npm-install-g-xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"\u7b80\u8981\u6982\u8ff0 \u5728\u8fdb\u884c\u5168\u5c40\u5b89\u88c5npm\u65f6\uff0c\u5982\u679c\u9047\u5230\u5b89\u88c5\u5931\u8d25\u7684\u9519\u8bef\uff0c\u4ee5\u4e0b\u662f\u89e3\u51b3\u65b9\u6cd5\u7684\u5907\u5fd8\u5f55\u3002 \u5f53\u5728\u8fd0\u884c&#8221;np [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5f53\u4f7f\u7528-npm-install-g-xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-13T19:49:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T10:36:33+00:00\" \/>\n<meta name=\"author\" content=\"\u96c5, \u609f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u96c5, \u609f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/\",\"name\":\"\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-01-13T19:49:36+00:00\",\"dateModified\":\"2024-04-30T10:36:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\",\"name\":\"\u96c5, \u609f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"caption\":\"\u96c5, \u609f\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5f53\u4f7f\u7528-npm-install-g-xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5","og_description":"\u7b80\u8981\u6982\u8ff0 \u5728\u8fdb\u884c\u5168\u5c40\u5b89\u88c5npm\u65f6\uff0c\u5982\u679c\u9047\u5230\u5b89\u88c5\u5931\u8d25\u7684\u9519\u8bef\uff0c\u4ee5\u4e0b\u662f\u89e3\u51b3\u65b9\u6cd5\u7684\u5907\u5fd8\u5f55\u3002 \u5f53\u5728\u8fd0\u884c&#8221;np [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5f53\u4f7f\u7528-npm-install-g-xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-01-13T19:49:36+00:00","article_modified_time":"2024-04-30T10:36:33+00:00","author":"\u96c5, \u609f","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u96c5, \u609f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/","name":"\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-01-13T19:49:36+00:00","dateModified":"2024-04-30T10:36:33+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5f53\u4f7f\u7528 npm install -g xxx\uff08\u5168\u5c40\u5b89\u88c5\uff09\u51fa\u73b0\u9519\u8bef\u65f6\u7684\u5904\u7406\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6","name":"\u96c5, \u609f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","caption":"\u96c5, \u609f"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bd%93%e4%bd%bf%e7%94%a8-npm-install-g-xxx%ef%bc%88%e5%85%a8%e5%b1%80%e5%ae%89%e8%a3%85%ef%bc%89%e5%87%ba%e7%8e%b0%e9%94%99%e8%af%af%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=39515"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39515\/revisions"}],"predecessor-version":[{"id":93595,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39515\/revisions\/93595"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=39515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=39515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=39515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}