在节点上安装 reveal.js

Installing reveal.js on Node

我正在尝试在 Node 上安装 reveal.js,这样我就可以在本地使用演讲者笔记。

我按照说明操作但没有成功:https://github.com/hakimel/reveal.js/#full-setup

我在第一步遇到了这些错误:

SyntaxError: Unexpected identifier
at Object.exports.createScript (vm.js:24:10)
at REPLServer.defaultEval (repl.js:235:25)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)

如果您需要更多信息,请告诉我。我安装了 Node v4.4.6 LTS。

我只是按照说明使用 Node.js 版本:v5.7.0(npm 版本 v3.8.1)没有任何问题。

我建议安装 nvm (https://github.com/creationix/nvm),这样您就可以轻松切换 Node 版本来解决此类问题。

编辑:

如果您无法克隆存储库,请按照这些说明安装 git

https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

确保在将说明中的命令粘贴到终端时不要复制 $