question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't upload to simple HTML to SWA using `swa deploy` command

See original GitHub issue

Before filing this issue, please ensure you’re using the latest CLI by running swa --version and comparing to the latest version on npm.

Are you accessing the CLI from the default port :4280 ?

  • No, I am using a different port number (--port) and accessing the CLI from that port
  • Yes, I am accessing the CLI from port :4280

Make sure you are accessing the URL printed in the console when running swa start!

ℹ️ NOTE: Make sure to enable debug logs when running any swa commands using --verbose=silly

Describe the bug A clear and concise description of what the bug is.

I’m trying to upload HTMLs to the SWA. But nothing will be uploaded.

swa --verbose log deploy --env will --app-name aaabbccc -R ProjectDemo

image

To Reproduce Steps to reproduce the behavior:

  1. mkdir aa

  2. cd aa

  3. echo 'Hello world' > index.html

  4. swa login

    image

  5. Upload files

    swa --verbose log deploy --env will --app-name aaabbccc -R ProjectDemo
    

    image

    The SWA is actually not uploaded. I can’t see any error on my Terminal screen.

    image

Expected behavior

I expected to upload files successfully.

Screenshots

See above.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: 10.0.19043.2130

Additional context

Even I added --verbose log, but I still can’t see more logs. Is there any way to debug swa-cli?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sgollapudi77commented, Nov 9, 2022

Thanks @doggy8088 , we’re closing this issue.

1reaction
Reshmi-Sriramcommented, Oct 19, 2022

Hi @doggy8088, Apologies for the experience! To begin with, could you please try the command --verbose=silly to be able to see the more logs in the commandline? And regarding the issue, it is a known bug as of now and the team is actively working towards enabling deployment from the root folder (which so happens to be the case for most of the simple HTML apps). You can read more about this here. As an alternative, I’d recommend trying to set up an app-location with the index.html in it and try swa deploy --app-location ... command to see if this works.

Related to #514

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you deploy a next.js app using SWA-CLI (for Azure ...
I created a basic next js app on my machine using npx create-next-app@latest. After installing the SWA-cli, I run swa init.
Read more >
swa deploy | Static Web Apps CLI
This command is used to deploy the current project to Azure Static Web Apps. Here are some common use cases: Deploy a front-end...
Read more >
Building your first static site with the Azure Static Web Apps
In this quickstart, you deploy an application to Azure Static Web apps using the Visual Studio Code extension.
Read more >
Managing application versions - AWS Elastic Beanstalk
You can also upload a source bundle without deploying it from the application management console or with the EB CLI command eb appversion....
Read more >
Deploying a Static Site - Vite
You can use equivalent commands to run the scripts if you are using Yarn or ... If you are deploying to https://<USERNAME>.github.io/<REPO>/ ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found