node-ftp-client
node-ftp-client copied to clipboard
I am getting following error how to resolve it
module.js:549 throw err; ^
Error: Cannot find module 'ftp'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.
client.connect(function () {
client.upload(['test/**'], '/public_html/test', {
baseDir: 'test',
overwrite: 'older'
}, function (result) {
console.log(result);
});
client.download('/public_html/test2', 'test2/', {
overwrite: 'all'
}, function (result) {
console.log(result);
});
});
Have you done npm install
before creating your download and upload functions?
Thanks @markpython86, that's right @vaibhavgatne, as you can see in https://github.com/noodny/node-ftp-client/blob/master/package.json#L34, ftp
is a dependency of this module.