我正在测试一个小想法,即在 CloudFoundry 上有一个 node.js 脚本来在另一个 FTP 站点中写入文件。
var Ftp = require("jsftp");
var ftp = new Ftp({
host: "ftp.somesite.com",
user: "username",
port: 21,
pass: "password"
});
var remotePath = "/test.txt";
var data = 'this is a test string';
ftp.getPutSocket(remotePath, function(err, socket) {
socket.write(data, function(err) {
console.log('good');
socket.end();
});
});
但是,当我这样做时,vmc push
我得到了这个错误
Uploading my-ftp... FAILED
Upload failed. Try again with 'vmc push'.
Errno::ENOENT: No such file or directory - C:/Users/myUsername/AppData/Local/Temp/.
vmc_my-ftp_files/node_modules/jsftp/test/test_c9/??.md
For more information, see ~/.vmc/crash
该crash
文件也没有告诉我太多:
Errno::ENOENT: No such file or directory - C:/Users/myUsername/AppData/Local/Temp/.vmc_my-ftp_files/node_modules/jsftp/test/test_c9/??.md
cfoundry-0.4.14/lib/cfoundry/upload_helpers.rb:146:in `size'
cfoundry-0.4.14/lib/cfoundry/upload_helpers.rb:146:in `block in make_fingerprints'
cfoundry-0.4.14/lib/cfoundry/upload_helpers.rb:143:in `glob'
cfoundry-0.4.14/lib/cfoundry/upload_helpers.rb:143:in `make_fingerprints'
cfoundry-0.4.14/lib/cfoundry/upload_helpers.rb:125:in `determine_resources'
cfoundry-0.4.14/lib/cfoundry/upload_helpers.rb:44:in `upload'
vmc-0.4.7/lib/vmc/cli/app/push.rb:119:in `block in upload_app'
interact-0.5.0/lib/interact/progress.rb:98:in `with_progress'
vmc-0.4.7/lib/vmc/cli/app/push.rb:118:in `upload_app'
vmc-0.4.7/lib/vmc/cli/app/push.rb:100:in `setup_new_app'
vmc-0.4.7/lib/vmc/cli/app/push.rb:82:in `push'
mothership-0.3.5/lib/mothership/base.rb:61:in `run'
mothership-0.3.5/lib/mothership/command.rb:68:in `block in invoke'
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:113:in `call'
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:113:in `block (2 levels) in <class:Manifests>'
mothership-0.3.5/lib/mothership/callbacks.rb:74:in `with_filters'
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:112:in `block in <class:Manifests>'
mothership-0.3.5/lib/mothership/command.rb:78:in `instance_exec'
mothership-0.3.5/lib/mothership/command.rb:78:in `block (2 levels) in invoke'
mothership-0.3.5/lib/mothership/command.rb:82:in `instance_exec'
mothership-0.3.5/lib/mothership/command.rb:82:in `invoke'
mothership-0.3.5/lib/mothership/base.rb:50:in `execute'
vmc-0.4.7/lib/vmc/cli.rb:106:in `execute'
mothership-0.3.5/lib/mothership.rb:45:in `start'
vmc-0.4.7/bin/vmc:11:in `<top (required)>'
C:/Ruby193/bin/vmc:23:in `load'
C:/Ruby193/bin/vmc:23:in `<main>'
知道我做错了什么吗?它在本地主机上运行良好。