-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swa start doesn't run both api and static site together #599
Comments
Hi @peterfearn, |
Hi @peterfearn, we couldn't repro the issue. Are you using the sample repo provided in the documentation or own repository? If using your own repository, can you provide more details? |
I'm having the same issues with a TypeScript API. Dropping the
|
For reference, running the API as a separate process works as expected. OS: macOS 13.0
|
I've made the repo I'm using public - https://github.com/peterfearn/spa-vanilla - it was just generated from here https://github.com/staticwebdev/vanilla-basic/generate I've also had no luck when manually creating it too:
I've added basic files into the api and src directories (I've created a repo with them all https://github.com/peterfearn/swa-test) then when I do
I get the site running if I do
I get the api running but not the site |
It seems my issue is a duplicate of this one: #598 |
Hi, @peterfearn, @maxmalynowsky, I've tried with both your repos, and I didn't find any issue. I'm using the same versions |
@rupareddy5-21, my issue only appeared when using Node 18, Node 16 runs without any problems. When downgrading to |
I have downgraded node to 16.18.1 and it works now. I was previously running node 18.12.1 |
Same for me - downgrading to node 16 immediately solved the problem |
Thanks @peterfearn, @maxmalynowsky, we'll work on it. We're closing the issue, please feel free to raise concerns or re-open this if you're facing any issues. |
Please track the original issue here- #598. |
I'm trying node 16 also and have the problem (or at least very similar). I can hit the web app at the 7175 port below. But if I try at 4280 it says "the site can't be reached". I am using Node 16 and Chrome on Windows 11. (Note: I'm new to this; following a tutorial). Thanks. Here is the profiles node of my Client launchsettings.json. I've tried with and without the launchUrl delared. "profiles": { And here is the output c:\PositiveSum\Code\Samples\Scratchest>swa start https://localhost:7175 --verbose=silly Welcome to Azure Static Web Apps CLI (1.0.3) Getting config file options from swa-cli.config.json...
Checking if localhost:4280 is accepting TCP connections...
|
Describe the bug
I cannot start the static page and api at the same time using one command.
To Reproduce
swa start src --api-location api
Expected behaviour
I expect to be able to browse to http://localhost:4280 and make a GET api call to http://localhost:7071/api/message but can only access the api, the site at 4280 is not running.
If I run the command
swa start src
then I get the http://localhost:4280 site running, but obviously not the APIOutput (verbose)
log from running
swa start src --api-location api --verbose=silly
log from running
swa start src --verbose=silly
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: