我在这里给出的指令上安装了ubuntu上的nodejs
当我node --version在终端写信时,我看到了这个:
-bash: /usr/sbin/node: No such file or directory
不过,我可以在/usr/sbin/目录中看到节点.
写作npm --version表明1.3.5
写作nodejs --version表演v0.10.15
另外,我可以在/usr/bin/目录中看到节点.
那么,我该如何node工作?
此外,如果我使用zsh而不是bash,那么node命令工作.
我刚刚安装了node.js. 我尝试编写应该检查版本的节点-v - 它不起作用.这是输出:
> node -v ReferenceError: node is not defined
at repl:1:2 at REPLServer.self.eval (repl.js:110:21)
at Interface.<anonymous> (repl.js:239:12)
at Interface.emit (events.js:95:17)
at Interface._onLine (readline.js:202:10)
at Interface._line (readline.js:531:8)
at Interface._ttyWrite (readline.js:760:14)
at ReadStream.onkeypress (readline.js:99:10)
at ReadStream.emit (events.js:98:17)
at emitKey (readline.js:1095:12) >
Run Code Online (Sandbox Code Playgroud)
我用git-command打开它: node
我尝试使用"Git"运行它,想想也许这是问题,我得到完全相同的输出.
我正在使用Windows 8,如果它是相关的 - 按照本教程一直到现在:
https://www.youtube.com/watch?v=tlntE8fe6u4
我如何使其工作?
我正在使用Ubuntu Linux.
我该如何查看当前nodejs版本?我想,我有6个版本,但我不确定.
有没有办法改变它,因为我需要4个版本.有人可以一步一步地命令吗?
要获取节点版本 - 我希望运行以下命令:
node --version
Run Code Online (Sandbox Code Playgroud)
我正在使用 docker 运行以下命令:
docker run node:4-onbuild -v
Run Code Online (Sandbox Code Playgroud)
我明白了:
docker: Error response from daemon: Container command '--version' not found or does not exist..
Run Code Online (Sandbox Code Playgroud)
我的问题是:如何从 docker 容器获取节点版本?