Giter VIP home page Giter VIP logo

Comments (14)

Dan503 avatar Dan503 commented on July 25, 2024 9

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.

udayms avatar udayms commented on July 25, 2024

I managed to fix it by using the parent path. Thanks. Closing this issue.

from gulp-sftp.

danimajo avatar danimajo commented on July 25, 2024

@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.

udayms avatar udayms commented on July 25, 2024

@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.

davismj avatar davismj commented on July 25, 2024

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.

gtg092x avatar gtg092x commented on July 25, 2024

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.

nickdunn avatar nickdunn commented on July 25, 2024

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.

gtg092x avatar gtg092x commented on July 25, 2024

@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.

chris-equis avatar chris-equis commented on July 25, 2024

I am having the same promble using 0.1.4 client machine: OSX, server machine: Ubuntu 14.10, auth SSH keys

from gulp-sftp.

WuJiangquan avatar WuJiangquan commented on July 25, 2024

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.

markymcfly avatar markymcfly commented on July 25, 2024

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.

potapovnikita avatar potapovnikita commented on July 25, 2024

The same problem. Iā€™m use Mac OS Sierra -> Linux centos

from gulp-sftp.

 avatar commented on July 25, 2024

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.

 avatar commented on July 25, 2024

Just noticed @WuJiangquan said the same thing, but hopefully this is more clear.

from gulp-sftp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.