Comments (14)
Why close the issue just because you found a work around? This is still an issue with the core plugin.
Instead of just erroring, it would be far more user friendly if it created any directories that don't currently exist.
I'm on version 0.1.5 and still getting this issue.
from gulp-sftp.
I managed to fix it by using the parent path. Thanks. Closing this issue.
from gulp-sftp.
@udayms How did you fix this? I have the same issue, I am uploading a set of files, some of them are in subdirs, but these subdirs aren't created and I get:
[14:51:31] gulp-sftp: Uploaded: stammdaten.html => /home/danimajo/html/willi/test/stammdaten.html
[14:51:31] SFTP error or directory exists: Error: No such file home/danimajo/html/willi/test/app
events.js:72
throw er; // Unhandled 'error' event
^
Error: No such file
from gulp-sftp.
@danimajo The documentation says as follows:
options.remotePath
Type: String
Default: '/'
The remote path to upload too. This path should exist, though the child directories that house your files do not need to.
Which means, whatever is passed as the remotePath should exist. All recursive directories inside it will be taken care of. In your context, if you are uploading a file to willi/test, then in remotePath pass 'willi'. This directory must exist. The 'test' will be created if your source is also 'willi'.
Hope this helps :)
from gulp-sftp.
Doesn't help. I'm getting the same problem. I am using remotePath. For example, the first directory does exist on the server, and it works fine. The second directory does not, and it throws the error danimajo quoted and exits.
from gulp-sftp.
Can you make sure you have the latest version? Also can I get the OS of both your client and server? You might need to open a new issue if your problem is different the OPs.
from gulp-sftp.
I'm also having the same problem. Deploying from OSX to a MediaTemple grid server (presumably Unix not Windows!).
remotePath: '/html'
With the following error:
[18:29:57] SFTP error or directory exists: Error: Failure /html
events.js:72
throw er; // Unhandled 'error' event
^
Error: No such file
at SFTP._parse (/Users/nick/Sites/uxua/node_modules/gulp-sftp/node_modules/ssh2/lib/SFTP/SFTPv3.js:1090:23)
at ChannelStream.<anonymous> (/Users/nick/Sites/uxua/node_modules/gulp-sftp/node_modules/ssh2/lib/SFTP/SFTPv3.js:72:10)
at ChannelStream.emit (events.js:95:17)
at ChannelStream.<anonymous> (_stream_readable.js:764:14)
at ChannelStream.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:426:10)
at emitReadable (_stream_readable.js:422:5)
at readableAddChunk (_stream_readable.js:165:9)
at ChannelStream.Readable.push (_stream_readable.js:127:10)
at Parser.<anonymous> (/Users/nick/Sites/uxua/node_modules/gulp-sftp/node_modules/ssh2/lib/Channel.js:102:25)
Using 0.1.4
from npm.
Even if I leave the remotePath to the default /
I get this error, even though when I SFTP using Transmit with the same credentials I can upload files into the default root.
Using https://github.com/sindresorhus/gulp-ftp with the same credentials works fine.
from gulp-sftp.
@nickdunn - I'll create a new issue for you on this. Your project root directory is not getting created? Can you verify that the destination is unix?
from gulp-sftp.
I am having the same promble using 0.1.4 client machine: OSX, server machine: Ubuntu 14.10, auth SSH keys
from gulp-sftp.
I set remotePath such as "./pathA/pathB/pathC/",
but it throwed an error too " no such file".
Then I found a bug at line 238
fileDirs = fileDirs.filter(function(d) { return d.length >= remotePath.length && !mkDirCache[d]; [});
](https://github.com/gtg092x/gulp-sftp/blob/master/index.js#L238)
fileDirs's origin value was ["./pathA/pathB/pathC","./pathA/pathB","./pathA"]
and my remotePath was "./pathA/pathB/pathC/"
"./pathA/pathB/pathC".length < "./pathA/pathB/pathC/".length always .
so at last the fileDirs (filter result) is an empty array.
As a result , it won't run the function sftp.mkdir to create my remotePath "./pathA/pathB/pathC/".
At last it works when I set my remotePath as "./pathA/pathB/pathC".
from gulp-sftp.
Make sure, you are using the DOCUMENT_ROOT for the "options.remotePath".
To get the DOCUMENT_ROOT just run info.php on your server:
info.php:
<?php phpinfo(); ?>
from gulp-sftp.
The same problem. Iām use Mac OS Sierra -> Linux centos
from gulp-sftp.
For anyone else facing this issue - I found the directory is not created if it has a trailing slash. Without a slash, it worked.
Working: some/directory/structure
Not Working: some/directory/structure/
from gulp-sftp.
Just noticed @WuJiangquan said the same thing, but hopefully this is more clear.
from gulp-sftp.
Related Issues (20)
- ignore files and folders HOT 1
- Execute remote commands
- Remote file structure is incorrect HOT 2
- Known file size is required HOT 3
- "Quiet" mode?
- Timed out while waiting for handshake HOT 2
- trying to upload a build
- Fails on symbolic links pointing to a directory
- Is this project abandoned?? HOT 5
- issue with connection HOT 2
- Add support for gulp-cached
- Directory creation oddities
- update dependency version for ssh2
- Error: read ECONNRESET
- TypeError: file.pipe is not a function HOT 21
- could you add delete server path for this plugin HOT 1
- Can't find uploaded file on my target machine
- Don't work to upload through gulp-sftp HOT 10
- gulp-util dependency
- sft hangs on connect when using putty ppk file as private key HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-sftp.