我将我的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
我不确定这个问题从哪里开始,但我假设它是使用启动脚本或需要配置的依赖项中的某些内容
答案 0 :(得分:0)
似乎安装了xmlbuilder,请运行
sudo npm install xmlbuilder
在终端然后运行
npm start
答案 1 :(得分:0)
您需要确保您位于/ usr / local / lib / node_modules / ionic / node_modules路径下,然后运行
sudo npm install xmlbuilder
希望这能解决您的问题