Ghost博客,在本地计算机上运行时出错

时间:2016-05-24 04:23:02

标签: node.js localhost openshift ghost

我在Openshift上安装了ghost博客并创建了本地副本以进行一些更改。我添加了新主题并将其部署回openshift。它工作正常,但我无法在我的本地计算机上运行此博客。 如果我运行NPM启动,我会收到以下错误:

> openshift-ghost-quickstart@ start C:\Users\darklord\OneDrive\Business\mean
> node index

Unhandled rejection Error: Cannot find module 'C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\sqlite3\lib\binding\node-v47-win32-x64\node_sqlite3.node'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\sqlite3\lib\sqlite3.js:4:15)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Client_SQLite3.initDriver (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\knex\lib\dialects\sqlite3\index.js:41:24)
    at new Client_SQLite3 (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\knex\lib\dialects\sqlite3\index.js:15:10)
    at Knex.initialize (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\knex\knex.js:109:15)
    at Knex (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\knex\knex.js:13:26)
    at ConfigManager.set (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\core\server\config\index.js:156:24)
    at ConfigManager.init (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\core\server\config\index.js:79:10)
    at C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\core\server\config\index.js:273:30
    at tryCatcher (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\bluebird\js\main\util.js:26:23)
    at Promise._settlePromiseFromHandler (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\bluebird\js\main\promise.js:507:31)
    at Promise._settlePromiseAt (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\bluebird\js\main\promise.js:581:18)
    at Promise._settlePromises (C:\Users\darklord\OneDrive\Business\mean\node_modules\ghost\node_modules\bluebird\js\main\promise.js:697:14)

我虽然这个errpr与sqlite3有关,所以我已经卸载并安装了它但仍然是同样的错误。

有人能告诉我我要犯的错误吗?

1 个答案:

答案 0 :(得分:0)

如果其他人遇到此问题。

您可能在本地计算机上运行了不同的node.js版本。

如果您的版本与他要求的{gostblog}\node_modules\ghost\node_modules\sqlite3\lib\binding\版本不同,您可以在node-v47-win32-x64文件夹中手动检查。

只需在本地计算机上重新安装Ghost依赖项即可使其运行。