Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

After build flutter web successfully build/web dir is not exists

Mohammad September 2, 2024 edited

 

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.

1 answer

1 accepted

0 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 3, 2024

G'day, @Mohammad 

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

Mohammad September 4, 2024 edited

GM, @Syahrul  , Ok thx i will try it now 

Mohammad September 4, 2024

@Syahrul , Thx a lot its work.

Like Syahrul likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
atlassian, forge, forge learning path, atlassian learning, cloud app development, forge app development, build forge apps, atlassian certification, developer training, jira app development, confluence app development, automation, ui frameworks

Turn Ideas into Atlassian Apps 📱

From setup to deployment—this learning path shows you how to build your first app using Forge. Learn the essentials, streamline workflows, and bring custom solutions to life across Jira, Confluence, and more.

Start Learning
AUG Leaders

Atlassian Community Events