Giter VIP home page Giter VIP logo

Comments (4)

lstorka avatar lstorka commented on June 1, 2024 4

Had the exact same problem and when I investigated the logs, one line caught my eye:
ℹ Current directory cannot be identical to or contained within artifact folders.

So I just navigated one directory up and then ran:
swa deploy --env production -a .\frontend
and now it was successfully deployed 😃

from static-web-apps-cli.

Peter-Juhasz avatar Peter-Juhasz commented on June 1, 2024 1

@lstorka Thanks for the workaround! It worked!

from static-web-apps-cli.

coder925 avatar coder925 commented on June 1, 2024

The workaround works.

If you run the successful command but with --dry-run added you will see information still suggesting an error:

i Could not get event info. Proceeding
i The content server has rejected the request with: BadRequest
i Reason: Missing request content.

Also, if you navigate up two directories:
swa deploy --env production -a .\dist\frontend
it stops working again. The CLI just returns to command prompt without writing the success message "Project deployed". No warning or errors are given.

from static-web-apps-cli.

conradagramont avatar conradagramont commented on June 1, 2024

Setting the variables in the config file and having the proper folder structure is key. BTW, I'd recommend always running the cli with the --verbose silly switch.

I just wrapped up a blog post that could help shed some light on this.
Using Azure Functions with Astro and Entra ID Authentication

from static-web-apps-cli.

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.