{"id":21438,"date":"2024-11-19T14:48:42","date_gmt":"2024-11-19T06:48:42","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21438\/"},"modified":"2024-11-19T14:48:42","modified_gmt":"2024-11-19T06:48:42","slug":"vscode%e6%80%8e%e4%b9%88%e7%bb%91%e5%ae%9anodejs","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21438\/","title":{"rendered":"vscode\u600e\u4e48\u7ed1\u5b9anodejs"},"content":{"rendered":"<blockquote><p>\n  \u8981\u5728 vscode \u4e2d\u7ed1\u5b9a node.js\uff0c\u8bf7\u786e\u4fdd\u8ba1\u7b97\u673a\u5df2\u5b89\u88c5 node.js\uff0c\u7136\u540e\u5728 vscode \u4e2d\u914d\u7f6e\u201cnode.js \u8def\u5f84\u201d\u8bbe\u7f6e\uff0c\u4ee5\u6307\u5411\u5b89\u88c5\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/29\/2024052913091739622.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u7ed1\u5b9anodejs\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u7ed1\u5b9anodejs\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 VSCode \u4e2d\u7ed1\u5b9a Node.js<\/strong><\/p>\n<p>\u8981\u5c06 Node.js \u7ed1\u5b9a\u5230 VSCode\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<p><strong>1. \u5b89\u88c5 Node.js<\/strong><\/p>\n<p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u8ba1\u7b97\u673a\u5df2\u5b89\u88c5 Node.js\u3002\u4f60\u53ef\u4ee5\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u5b83\uff1ahttps:\/\/.org\/en\/<\/p>\n<p><strong>2. \u914d\u7f6e VSCode<\/strong><\/p>\n<p>\u6253\u5f00 VSCode \u5e76\u8f6c\u5230\u201c\u6587\u4ef6\u201d&gt;\u201c\u9996\u9009\u9879\u201d&gt;\u201c\u8bbe\u7f6e\u201d\u3002<\/p>\n<p><strong>3. \u627e\u5230 Node.js \u8def\u5f84<\/strong><\/p>\n<p>\u5728\u201c\u8bbe\u7f6e\u201d\u641c\u7d22\u680f\u4e2d\uff0c\u952e\u5165\u201cnode.path\u201d\u3002\u8fd9\u5c06\u663e\u793a\u201cNode.js \u8def\u5f84\u201d\u8bbe\u7f6e\u3002<\/p>\n<p><strong>4. \u8bbe\u7f6e Node.js \u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84<\/strong><\/p>\n<p>\u5355\u51fb\u201c\u6d4f\u89c8\u201d\u6309\u94ae\uff0c\u7136\u540e\u5bfc\u822a\u5230\u6240\u5b89\u88c5 Node.js \u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\u3002\u901a\u5e38\uff0c\u8def\u5f84\u7c7b\u4f3c\u4e8e\uff1a<\/p>\n<ul>\n<li>Windows\uff1aC:Program Files odejs ode.exe<\/li>\n<li>macOS\uff1a\/usr\/local\/bin\/node<\/li>\n<\/ul>\n<p><strong>5. \u4fdd\u5b58\u5e76\u91cd\u65b0\u52a0\u8f7d<\/strong><\/p>\n<p>\u4fdd\u5b58\u8bbe\u7f6e\u540e\uff0c\u91cd\u65b0\u52a0\u8f7d VSCode \u4ee5\u5e94\u7528\u66f4\u6539\u3002<\/p>\n<p><strong>\u786e\u8ba4\u7ed1\u5b9a<\/strong><\/p>\n<p>\u8981\u786e\u8ba4 Node.js \u5df2\u7ed1\u5b9a\uff0c\u8bf7\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u7ec8\u7aef\u7a97\u53e3\u5e76\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>node --version<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5e94\u8be5\u4f1a\u663e\u793a Node.js \u7684\u7248\u672c\u53f7\uff0c\u8868\u660e\u5b83\u5df2\u6210\u529f\u7ed1\u5b9a\u5230 VSCode\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u4f60\u7684 VSCode \u5df2\u4e0e Node.js \u7ed1\u5b9a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 VSCode \u5f00\u53d1\u3001\u8fd0\u884c\u548c\u8c03\u8bd5 Node.js \u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u7ed1\u5b9a\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u5728 vscode \u4e2d\u7ed1\u5b9a node.js\uff0c\u8bf7\u786e\u4fdd\u8ba1\u7b97\u673a\u5df2\u5b89\u88c5 node.js\uff0c\u7136\u540e\u5728 vscode \u4e2d\u914d\u7f6e\u201cnode.js \u8def\u5f84\u201d\u8bbe\u7f6e\uff0c\u4ee5\u6307\u5411\u5b89\u88c5\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002 \u5982\u4f55\u5728 VSCode \u4e2d\u7ed1\u5b9a Node.js \u8981\u5c06 Node.js \u7ed1\u5b9a\u5230 VSCode\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a 1. \u5b89\u88c5 Node.js \u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u8ba1\u7b97\u673a\u5df2\u5b89\u88c5 Node.js\u3002\u4f60\u53ef\u4ee5\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u5b83\uff1ahttps:\/\/.org\/en\/ 2. \u914d\u7f6e VSCode \u6253\u5f00 VSCode \u5e76\u8f6c\u5230\u201c\u6587\u4ef6\u201d&gt;\u201c\u9996\u9009\u9879\u201d&gt;\u201c\u8bbe\u7f6e\u201d\u3002 3. \u627e\u5230 Node.js \u8def\u5f84 \u5728\u201c\u8bbe\u7f6e\u201d\u641c\u7d22\u680f\u4e2d\uff0c\u952e\u5165\u201cnode.path\u201d\u3002\u8fd9\u5c06\u663e\u793a\u201cNode.js \u8def\u5f84\u201d\u8bbe\u7f6e\u3002 4. \u8bbe\u7f6e Node.js \u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84 \u5355\u51fb\u201c\u6d4f\u89c8\u201d\u6309\u94ae\uff0c\u7136\u540e\u5bfc\u822a\u5230\u6240\u5b89\u88c5 Node.js \u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\u3002\u901a\u5e38\uff0c\u8def\u5f84\u7c7b\u4f3c\u4e8e\uff1a Windows\uff1aC:Program Files odejs ode.exe macOS\uff1a\/usr\/local\/bin\/node 5. \u4fdd\u5b58\u5e76\u91cd\u65b0\u52a0\u8f7d \u4fdd\u5b58\u8bbe\u7f6e\u540e\uff0c\u91cd\u65b0\u52a0\u8f7d VSCode \u4ee5\u5e94\u7528\u66f4\u6539\u3002 \u786e\u8ba4\u7ed1\u5b9a \u8981\u786e\u8ba4 Node.js \u5df2\u7ed1\u5b9a\uff0c\u8bf7\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u7ec8\u7aef\u7a97\u53e3\u5e76\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a node [&hellip;]<\/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-21438","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21438","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=21438"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21438\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}