我正在尝试基于 Deployd (deployd.com) 部署 node.js 应用程序。通过“af update myapp”部署时,出现以下错误:
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (2K): OK
Push Status: OK
Stopping Application 'myapp': OK
Staging Application 'myapp': OK
Starting Application 'myapp': .
Error: Application [myapp] failed to start, logs information below.
====> /logs/staging.log <====
# Logfile created on 2013-07-23 15:18:29 +0000 by logger.rb/25413
Skipping npm support: npm-shrinkwrap.json is not provided
====> /logs/stderr.log <====
module.js:340
throw err;
^
Error: Cannot find module 'deployd'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/mnt/var/vcap.local/dea/apps/myapp-0- cd2bdee578441089a86b3b0331a96cd5/app/index.js:1:77)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
所以看来 Deployd 模块有问题。我在 package.json 文件中声明了它:
{
"name": "myapp-test-deployd",
"version": "0.0.1",
"dependencies": {
"deployd": "0.6.10"
},
"engines": {
"node": "0.10.x",
"npm": "1.2.x"
}
}
我尝试通过以下方式安装它: npm install -d
或者: npm install 已部署
但我得到同样的错误。我不明白为什么这个模块不能在 Appfog 上运行。在本地工作·
谢谢。
运行 sudo npm install deployd --save 时得到的日志(最后一部分,对我来说似乎很有趣)
在子目录中: npm http ... [等等] npm http 304 https://registry.npmjs.org/stack-trace npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5 npm http 304 https://registry.npmjs.org/ini npm http GET https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/options npm http 304 https://registry .npmjs.org/tinycolor npm http 304 https://registry.npmjs.org/options
> ws@0.4.27 install /home/me/Development/myapp-deployd-test /node_modules/deployd/node_modules/socket.io/node_modules/socket.io- client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/me/Development/myapp-deployd-test/node_modules/deployd/node_modules/socket.io/node_modules/socket.io- client/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/home/me/Development/myapp-deployd-test/node_modules/deployd/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
deployd@0.6.10 ../node_modules/deployd
├── opener@1.3.0
├── scrubber@0.0.0
├── keypress@0.1.0
├── validation@0.0.1
├── step@0.0.5
├── semver@1.1.4
├── cookies@0.3.6
├── debug@0.7.2
├── corser@1.1.2
├── commander@1.0.5
├── wrench@1.3.9
├── q@0.8.12
├── async@0.1.22
├── mkdirp@0.3.5
├── underscore@1.5.1
├── ejs@0.7.2
├── shelljs@0.0.6pre2
├── doh@0.0.4 (ejs@0.8.4)
├── filed@0.1.0 (mime@1.2.9)
├── send@0.0.2 (fresh@0.1.0, range-parser@0.0.4, mime@1.2.6)
├── fstream@0.1.23 (inherits@1.0.0, graceful-fs@2.0.0, rimraf@2.2.2)
├── tar@0.1.17 (inherits@1.0.0, block-stream@0.0.6)
├── fstream-ignore@0.0.7 (inherits@2.0.0, minimatch@0.2.12)
├── mongodb@1.0.2 (bson@0.0.6)
├── http-proxy@0.8.1 (colors@0.6.0-1, pkginfo@0.2.3, optimist@0.2.8)
├── request@2.25.0 (forever-agent@0.5.0, aws-sign@0.3.0, json-stringify-safe@5.0.0, qs@0.6.5, tunnel-agent@0.3.0, oauth-sign@0.3.0, cookie-jar@0.3.0, node-uuid@1.4.0, mime@1.2.9, hawk@1.0.0, form-data@0.1.0, http-signature@0.10.0)
├── forever-monitor@1.1.0 (watch@0.5.1, pkginfo@0.3.0, minimatch@0.0.5, utile@0.1.7, ps-tree@0.0.3, broadway@0.2.7)
└── socket.io@0.9.16 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16)