node.js - 在 Ubuntu Web 服务器上安装 Readium Cloud Reader

标签 node.js git ubuntu readiumjs

所以我已经尝试安装readium云阅读器一段时间了。我遇到了一些问题,我修复了,我以为我安装正确,但我似乎无法让任何解压或压缩的 epub 工作。

以下是我遵循的安装说明:

  • 安装 Node.js(详细信息取决于您的操作系统)
  • 使用命令行安装 Grunt 构建工具:npm install -g grunt-cli
  • 从命令行运行:git clone https://github.com/readium/readium-js-viewer.git

  • 从命令行运行cd readium-js-viewer

  • 从命令行运行git submodule update --init --recursive
  • 从命令行运行 npm install (在 readium-js-viewer 中 目录)
  • 从命令行运行cd readium-js
  • 从命令行运行 npm install (在 readium-js 目录)

此后,我将目录更改为父目录,然后运行 ​​grunt 命令 grunt cloudReader 但出现错误,指出没有 grunt 文件。我认为运行最后一个 npm install 也会从 package.json 生成 grunt 文件。我查看了 npm 调试日志,但看不到任何有意义的错误消息。有人可以帮忙吗?

最佳答案

您需要使用 npm 运行命令,因为 grunt 不用作项目的任务运行程序。您可以在 package.jsonscripts 属性中查看命令列表。

我按照 Git Initialisation 下的说明进行操作在存储库中并在本地启动并运行:

# replace "BRANCH_NAME" with e.g. "develop"
$ git clone --recursive -b BRANCH_NAME https://github.com/readium/readium-js-viewer.git readium-js-viewer 
$ cd readium-js-viewer
$ git submodule update --init --recursive
$ git checkout BRANCH_NAME && git submodule foreach --recursive "git checkout BRANCH_NAME"
$ cd readium-js/ && npm update && cd ../ # had to update as some dependencies were missing
$ npm run http # launch the development server

不过,我不知道如何打包或添加内容。看起来 epub_library.opds 已以某种方式更新,epub_content 中的书籍出现在书架中。

关于node.js - 在 Ubuntu Web 服务器上安装 Readium Cloud Reader,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39071499/

相关文章:

javascript - 使用 passport.authenticate 后注册

javascript - 使用Express JS部署Elasticsearch

git - 如何还原提交并从这些更改创建新分支?

command-line - 在 MongoDB 控制台中重复最后一个命令?

ubuntu - gpg : "tag:launchpad.net:2008:redacted" not a key ID: skipping error while installing new packages using apt-get

.net - 如何在 Ubuntu/Linux 中部署 Node.js 应用程序?

node.js - Jest 测试失败时如何打印请求和响应?

javascript - Nodejs 中长时间运行的请求

git - 在 Windows 上的 Git 身份验证中禁用 "Sign into your account"

git - 无法取消忽略 Git 存储库中以前忽略的文件