NodeJS 语法错误:意外标识符[已关闭]

atmip9wb  于 2023-02-08  发布在  Node.js
关注(0)|答案(1)|浏览(194)

2天前关闭。
Improve this question
我安装了Node.js 19.6.0。现在,如果我打开Node.js窗口并键入"git clone https://github.com/openai/openai-quickstart-node.git"以下载存储库,我会得到错误Unexpected identifier 'clone'。我是Node.js的新手,不明白原因。您能帮我解决吗?
git克隆https://github.com/openai/openai-quickstart-node.git ^^^^
未捕获的语法错误:意外的标识符"clone"
enter image description here
最好的问候罗伯特
打开Node.js并尝试触发命令

nhaq1z21

nhaq1z211#

这里的错误在于您试图在Node.js解释器内部使用git clone,这与命令行不同。要克隆一个仓库,您需要在安装了Git的机器上使用命令行。

相关问题