0

我将我的ghost repo克隆到另一台计算机上并运行npm install以在本地安装所有依赖项,在我尝试运行npm start以在本地启动ghost服务器后,我抛出了这个错误:

user:user-folder user$ npm start

> ghost@0.6.4 start /Users/user/Desktop/Projects/node/user-folder
> node index

module.js:338
    throw err;
          ^
Error: Cannot find module 'xmlbuilder'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/user/Desktop/Projects/node/user-folder/node_modules/nodemailer/node_modules/aws-sdk/lib/xml/builder.js:2:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/user/Desktop/Projects/node/user-folder/node_modules/nodemailer/node_modules/aws-sdk/lib/core.js:42:14)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.5
npm ERR! code ELIFECYCLE
npm ERR! ghost@0.6.4 start: `node index`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ghost@0.6.4 start script 'node index'.
npm ERR! This is most likely a problem with the ghost package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index
npm ERR! You can get their info via:
npm ERR!     npm owner ls ghost
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/user/Desktop/Projects/node/user-folder/npm-debug.log

我不确定这个问题从哪里开始,但我假设它与启动脚本或依赖项中需要配置的东西有关

4

2 回答 2

0

似乎 xmlbuilder 已安装 nod 请运行

sudo npm install xmlbuilder

在终端中,然后运行

npm start
于 2015-06-05T20:59:24.897 回答
0

您需要确保您位于 /usr/local/lib/node_modules/ionic/node_modules 路径下,然后运行

sudo npm install xmlbuilder

希望这能解决你的问题

于 2016-02-24T02:03:00.430 回答