{"id":52856,"date":"2024-12-03T08:22:21","date_gmt":"2024-12-03T00:22:21","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52856\/"},"modified":"2024-12-03T08:22:21","modified_gmt":"2024-12-03T00:22:21","slug":"%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d-node-js-%e9%a1%b9%e7%9b%ae%e9%87%8d%e5%a4%8d%e5%ae%89%e8%a3%85%e4%be%9d%e8%b5%96%e5%ba%93%e5%b9%b6%e8%8a%82%e7%9c%81%e5%ad%98%e5%82%a8%e7%a9%ba%e9%97%b4%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52856\/","title":{"rendered":"\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f<\/h1>\n<p>IT\u884c\u4e1a\u76f8\u5bf9\u4e8e\u4e00\u822c\u4f20\u7edf\u884c\u4e1a\uff0c\u53d1\u5c55\u66f4\u65b0\u901f\u5ea6\u66f4\u5feb\uff0c\u4e00\u65e6\u505c\u6b62\u4e86\u5b66\u4e60\uff0c\u5f88\u5feb\u5c31\u4f1a\u88ab\u884c\u4e1a\u6240\u6dd8\u6c70\u3002\u6240\u4ee5\u6211\u4eec\u9700\u8981\u8e0f\u8e0f\u5b9e\u5b9e\u7684\u4e0d\u65ad\u5b66\u4e60\uff0c\u7cbe\u8fdb\u81ea\u5df1\u7684\u6280\u672f\uff0c\u5c24\u5176\u662f\u521d\u5b66\u8005\u3002\u4eca\u5929\u7c73\u4e91\u7ed9\u5927\u5bb6\u6574\u7406\u4e86\u300a\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f\u300b\uff0c\u804a\u804a\uff0c\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241124\/1732413288674287689f235.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u907f\u514d\u591a\u4e2a\u9879\u76ee\u91cd\u590d\u5b89\u88c5 node.js \u5e93\u4ee5\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u6709\u591a\u4e2a\u4f7f\u7528\u76f8\u540c\u5e93\u7684 npm \u9879\u76ee\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5927\u91cf\u7684\u5b58\u50a8\u7a7a\u95f4\u6d6a\u8d39\uff0c\u56e0\u4e3a\u76f8\u540c\u7684\u5e93\u5728\u6bcf\u4e2a\u9879\u76ee\u4e2d\u90fd\u4f1a\u91cd\u590d\u5b89\u88c5\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528 pnpm\uff0c\u5b83\u662f\u4e00\u79cd\u66ff\u4ee3 npm \u7684\u5305\u7ba1\u7406\u5668\uff0c\u901a\u8fc7\u5728\u4e2d\u592e\u5b58\u50a8\u533a\u7ba1\u7406\u4f9d\u8d56\u9879\u6765\u89e3\u51b3\u6b64\u95ee\u9898\u3002<\/p>\n<p>\u4e0e npm \u4e0d\u540c\uff0cpnpm \u5c06\u6240\u6709\u4f9d\u8d56\u9879\u5b89\u88c5\u5230\u4e00\u4e2a\u540d\u4e3a\u300c\u4ed3\u5e93\u300d\u7684\u4e2d\u592e\u4f4d\u7f6e\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u5b89\u88c5\u5230\u6bcf\u4e2a\u9879\u76ee\u4e2d\u3002\u5f53\u5176\u4ed6\u9879\u76ee\u9700\u8981\u8fd9\u4e9b\u4f9d\u8d56\u9879\u65f6\uff0c\u5b83\u4eec\u53ef\u4ee5\u901a\u8fc7\u8f6f\u94fe\u63a5\u5c06\u8fd9\u4e9b\u4f9d\u8d56\u9879\u94fe\u63a5\u5230\u81ea\u5df1\u7684\u300cnode_modules\u300d\u6587\u4ef6\u5939\u4e2d\uff0c\u4ece\u800c\u907f\u514d\u91cd\u590d\u5b89\u88c5\u3002<\/p>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u53ef\u4ee5\u8282\u7701\u78c1\u76d8\u7a7a\u95f4\uff0c\u8fd8\u53ef\u4ee5\u63d0\u9ad8\u5b89\u88c5\u901f\u5ea6\u548c\u51cf\u5c11\u5185\u5b58\u5360\u7528\u3002\u8981\u4f7f\u7528 pnpm\uff0c\u60a8\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<pre>npm install -g pnpm<\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u7528 pnpm \u66ff\u6362 npm \u6765\u7ba1\u7406\u60a8\u7684\u4f9d\u8d56\u9879\u3002\u4f8b\u5982\uff0c\u8981\u5b89\u88c5 antd\uff0c\u60a8\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>pnpm install antd<\/pre>\n<p>\u901a\u8fc7\u4f7f\u7528 pnpm\uff0c\u60a8\u53ef\u4ee5\u907f\u514d\u5728\u591a\u4e2a npm \u9879\u76ee\u4e2d\u91cd\u590d\u5b89\u88c5\u5e93\uff0c\u4ece\u800c\u5927\u5e45\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\u3002<\/p>\n<p>\u672c\u7bc7\u5173\u4e8e\u300a\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f\u300b\u7684\u4ecb\u7ecd\u5c31\u5230\u6b64\u7ed3\u675f\u5566\uff0c\u4f46\u662f\u5b66\u65e0\u6b62\u5883\uff0c\u60f3\u8981\u4e86\u89e3\u5b66\u4e60\u66f4\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   \u5982\u4f55\u6253\u5f00\u7535\u8111\u8ba1\u7b97\u5668| \u7535\u8111\u8ba1\u7b97\u5668\u5728\u54ea\u91cc\u6253\u5f00\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f IT\u884c\u4e1a\u76f8\u5bf9\u4e8e\u4e00\u822c\u4f20\u7edf\u884c\u4e1a\uff0c\u53d1\u5c55\u66f4\u65b0\u901f\u5ea6\u66f4\u5feb\uff0c\u4e00\u65e6\u505c\u6b62\u4e86\u5b66\u4e60\uff0c\u5f88\u5feb\u5c31\u4f1a\u88ab\u884c\u4e1a\u6240\u6dd8\u6c70\u3002\u6240\u4ee5\u6211\u4eec\u9700\u8981\u8e0f\u8e0f\u5b9e\u5b9e\u7684\u4e0d\u65ad\u5b66\u4e60\uff0c\u7cbe\u8fdb\u81ea\u5df1\u7684\u6280\u672f\uff0c\u5c24\u5176\u662f\u521d\u5b66\u8005\u3002\u4eca\u5929\u7c73\u4e91\u7ed9\u5927\u5bb6\u6574\u7406\u4e86\u300a\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f\u300b\uff0c\u804a\u804a\uff0c\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\uff01 \u5982\u4f55\u907f\u514d\u591a\u4e2a\u9879\u76ee\u91cd\u590d\u5b89\u88c5 node.js \u5e93\u4ee5\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f \u5982\u679c\u60a8\u6709\u591a\u4e2a\u4f7f\u7528\u76f8\u540c\u5e93\u7684 npm \u9879\u76ee\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5927\u91cf\u7684\u5b58\u50a8\u7a7a\u95f4\u6d6a\u8d39\uff0c\u56e0\u4e3a\u76f8\u540c\u7684\u5e93\u5728\u6bcf\u4e2a\u9879\u76ee\u4e2d\u90fd\u4f1a\u91cd\u590d\u5b89\u88c5\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528 pnpm\uff0c\u5b83\u662f\u4e00\u79cd\u66ff\u4ee3 npm \u7684\u5305\u7ba1\u7406\u5668\uff0c\u901a\u8fc7\u5728\u4e2d\u592e\u5b58\u50a8\u533a\u7ba1\u7406\u4f9d\u8d56\u9879\u6765\u89e3\u51b3\u6b64\u95ee\u9898\u3002 \u4e0e npm \u4e0d\u540c\uff0cpnpm \u5c06\u6240\u6709\u4f9d\u8d56\u9879\u5b89\u88c5\u5230\u4e00\u4e2a\u540d\u4e3a\u300c\u4ed3\u5e93\u300d\u7684\u4e2d\u592e\u4f4d\u7f6e\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u5b89\u88c5\u5230\u6bcf\u4e2a\u9879\u76ee\u4e2d\u3002\u5f53\u5176\u4ed6\u9879\u76ee\u9700\u8981\u8fd9\u4e9b\u4f9d\u8d56\u9879\u65f6\uff0c\u5b83\u4eec\u53ef\u4ee5\u901a\u8fc7\u8f6f\u94fe\u63a5\u5c06\u8fd9\u4e9b\u4f9d\u8d56\u9879\u94fe\u63a5\u5230\u81ea\u5df1\u7684\u300cnode_modules\u300d\u6587\u4ef6\u5939\u4e2d\uff0c\u4ece\u800c\u907f\u514d\u91cd\u590d\u5b89\u88c5\u3002 \u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u53ef\u4ee5\u8282\u7701\u78c1\u76d8\u7a7a\u95f4\uff0c\u8fd8\u53ef\u4ee5\u63d0\u9ad8\u5b89\u88c5\u901f\u5ea6\u548c\u51cf\u5c11\u5185\u5b58\u5360\u7528\u3002\u8981\u4f7f\u7528 pnpm\uff0c\u60a8\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a npm install -g pnpm \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u7528 pnpm \u66ff\u6362 npm \u6765\u7ba1\u7406\u60a8\u7684\u4f9d\u8d56\u9879\u3002\u4f8b\u5982\uff0c\u8981\u5b89\u88c5 antd\uff0c\u60a8\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a pnpm install antd \u901a\u8fc7\u4f7f\u7528 pnpm\uff0c\u60a8\u53ef\u4ee5\u907f\u514d\u5728\u591a\u4e2a npm \u9879\u76ee\u4e2d\u91cd\u590d\u5b89\u88c5\u5e93\uff0c\u4ece\u800c\u5927\u5e45\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\u3002 \u672c\u7bc7\u5173\u4e8e\u300a\u5982\u4f55\u907f\u514d Node.js \u9879\u76ee\u91cd\u590d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5e76\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\uff1f\u300b\u7684\u4ecb\u7ecd\u5c31\u5230\u6b64\u7ed3\u675f\u5566\uff0c\u4f46\u662f\u5b66\u65e0\u6b62\u5883\uff0c\u60f3\u8981\u4e86\u89e3\u5b66\u4e60\u66f4\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01 \u5982\u4f55\u6253\u5f00\u7535\u8111\u8ba1\u7b97\u5668| \u7535\u8111\u8ba1\u7b97\u5668\u5728\u54ea\u91cc\u6253\u5f00\uff1f<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-52856","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=52856"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52856\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}