After build flutter web successfully build/web dir is not exists
Asked by Mohammad:

I need to upload to the server using ftp server but noting is uploaded what is the problem?

**Any one can help?**

**Error**

mirror: Access failed: /opt/atlassian/pipelines/agent/build/dist: No such file or directory  
ls: cannot access 'build/web/': No such file or directory  
Script  

```
- step:
    name: Install Flutter and Set Up Environment
    script:
      # Flutter and Dart are already included in the Docker image
      - export PATH="$PATH:/sdks/flutter/bin"
      # Check Flutter and Dart versions
      - flutter --version
      - dart --version
      # Run flutter doctor to check for any additional setup required
      - flutter doctor

- step:
    name: Check Flutter Installation
    script:
      - flutter --version
      - echo "Flutter is correctly installed and available."

- step:
    name: Build Flutter Web Application
    script:
        # Set the PATH for the current session
        - export PATH="$PATH:/sdks/flutter/bin"
        # Clean build directories
        - flutter clean
        # Install packages
        - GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa" flutter pub get
        # Build the Flutter web app
        - flutter build web --web-renderer canvaskit --release

# Check if the build output exists
- step:
    name: Check Build Output
    script:
    - ls -la build/web/

- step:
   name: Deploy Web Application to FTP Server
   script:
        - echo "Uploading files to FTP server...."
        - pipe: atlassian/ftp-deploy:0.7.1
          variables:
            USER: '********'
            PASSWORD: '********'
            SERVER: '**********'
            REMOTE_PATH: '/apachewebserver8.2\htdocs\ibs-cab-corp'
            LOCAL_PATH: 'build/web'
```

mirror: Access failed: /opt/atlassian/pipelines/agent/build/dist: No such file or directory  
Status: Downloaded newer image for bitbucketpipelines/ftp-deploy:0.7.1  
61
INFO: Starting FTP deployment to *****/***/***/****...  
mirror: Access failed: /opt/atlassian/pipelines/agent/build/build/web: No such file or directory  
? Deployment finished.  
Status: Downloaded newer image for bitbucketpipelines/ftp-deploy:0.7.1  
INFO: Starting FTP deployment to **REMOTE_PATH***...  
**`mirror: Access failed: /opt/atlassian/pipelines/agent/build/build/web: No such file or directory`**  
? Deployment finished.  


Answers:
author: Syahrul
body: G'day, [@Mohammad](/t5/user/viewprofilepage/user-id/5352055)

The error indicates that the path or the directory does not exist in your build. I think the path is incorrect. You should just use the 'web' only path in this case because from the error, it looks like it tries to look for the following path:

```
/opt/atlassian/pipelines/agent/build/build/web
```

It should be:

```
/opt/atlassian/pipelines/agent/build/web
```

So you should change your pipe to the following:

```
   script:
        - echo "Uploading files to FTP server...."
        - pipe: atlassian/ftp-deploy:0.7.1
          variables:
            USER: '********'
            PASSWORD: '********'
            SERVER: '**********'
            REMOTE_PATH: '/apachewebserver8.2\htdocs\ibs-cab-corp'
            LOCAL_PATH: 'web'
```

Let me know how it goes.

Regards,  
Syahrul

comments: author: Mohammad
body: GM, [@Syahrul](/t5/user/viewprofilepage/user-id/744536) , Ok thx i will try it now


author: Mohammad
body: [@Syahrul](/t5/user/viewprofilepage/user-id/744536) , Thx a lot its work.


author: Mohammad
body: Hi [@Syahrul](/t5/user/viewprofilepage/user-id/744536) ,

you can help in this issue <https://community.atlassian.com/t5/Pipelines-questions/Issue-Missing-Files-in-Build-Output-Bitbucket-Pipelines/qaq-p/2803492>


Tags: bitbucket-cloud

cloud