Comments (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.
@lstorka Thanks for the workaround! It worked!
from static-web-apps-cli.
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.
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)
- Deploying Blazor WASM to Azure Static Web App from Visual Studio
- Azure Static Web Apps Cli command failing on Linux
- Flaky CLI deployment HOT 3
- swa-cli.config.json "run" field <undefined>when "npm run vite:dev". Vite never runs
- SWA CLI and Visual Studio debugger does not connect in Visual Studio 17.8.6 HOT 2
- Dependency on json.schemastore.org breaks CLI HOT 21
- Pipelines fail due to https://json.schemastore.org/staticwebapp.config.json network timeout HOT 2
- Failed to load staticwebapp.config.json schema. Continuing without validation! HOT 3
- Old Data API builder version used HOT 3
- Custom SWA roles don't work in Data API builder HOT 1
- `swa [login|deploy]` fails with `Cannot spawn a message bus without a machine-id` in devcontainer
- Error message unclear when trying to deploy a Function with unsupported Node version
- No errors at deployment when using runtime v4 with managed functions
- Cannot deploy if app dist folder or function project is in project root
- SWA broken as of node version `20.13.0` HOT 3
- Successfully logged into Azure! – Failed to setup project: EPERM: operation not permitted
- swa deploy fails after 31 minutes due to failure to upload
- Failed to setup project: EPERM: operation not permitted
- Error message when reaching .../.auth/login/google?... : ClientId not found for 'google' provider
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from static-web-apps-cli.