【发布时间】:2015-11-10 19:53:43
【问题描述】:
我在 OpenShift 上建立了一个 Ghost 博客,发现这个过程相当简单。该站点已启动并正在运行,我什至设置了 Jenkins 以在需要推动更改时进行持续集成。
我还没有进行任何重大更改(到目前为止只是样式更新),因为我不知道如何设置测试/开发环境。在将较大的代码更改提交到 OpenShift 上的主 Git 存储库之前,我应该如何设置一个可以测试较大代码更改的环境?
有没有办法让应用程序在本地运行?我已经尝试 cd-ing 到我的终端(在 Mac 上)中的应用程序目录,但是当我运行 npm start 时,我得到以下...
> openshift-ghost-quickstart@ start /path_to_my_app/dev/app
> node index
Unhandled rejection Error: Cannot find module '/path_to_my_app/dev/app/node_modules/ghost/node_modules/sqlite3/lib/binding/node-v11-darwin-x64/node_sqlite3.node'
(node_sqlite3.node 确实存在,顺便说一句)
我需要做些什么来设置它,以便我能够使用相同的代码库和 repo,但在实际将它们提交到 repo 之前在本地查看我的更改?任何帮助,将不胜感激。多谢!
【问题讨论】:
-
尝试运行
npm update以克服您列出的特定错误。 -
谢谢@mbaird!运行 npm update 后,我现在在运行 npm start 时看到以下内容: > openshift-ghost-quickstart@ start /path-to-app > node index Migrations: Database initialisation required for version 003 Migrations: Creating tables... Migrations:创建表:发布未处理的拒绝错误:SQLITE_CANTOPEN:无法在 Client_SQLite3.acquireRawConnection (/path-to-app/node_modules/ghost/node_modules/knex/lib/dialects/sqlite3/index.js:89:10) 处打开数据库文件您认为这只是权限问题还是我需要更新 config.js 中的一些内容?
标签: git openshift development-environment ghost-blog ghost