Comments (4)
Do you happen to have the Azurite extension installed? This is likely coming from the Functions extension which is running the check via the Azurite extension
from vscode-azurestaticwebapps.
I certainly do have the Azurite extension installed. I tried it again and this time selected the 'Debug anyway' option to see what would happen and it's a little weird.
When I run the app from the command line using the swa sdk I see this output in the terminal:
mobile swa start http://localhost:10000 --api-location ../api --run "npm run start"
Welcome to Azure Static Web Apps CLI (1.1.6)
***********************************************************************
* WARNING: This emulator may not match the cloud environment exactly. *
* Always deploy and test your app in Azure. *
***********************************************************************
[api]
Azure Functions Core Tools
[api] Core Tools Version: 4.0.5455 Commit hash: N/A (64-bit)
[api] Function Runtime Version: 4.27.5.21554
[api]
[run]
[run] > [email protected] start
[run] > gulp
[run]
[swa]
[swa] Found configuration file:
[swa] C:\Dev\srdavidson\mobile\staticwebapp.config.json
[swa]
[swa] - Waiting for http://localhost:10000 to be ready
[api] [2023-12-06T20:25:40.353Z] Worker process started and initialized.
[api]
[api] Functions:
[api]
[api] Addresses: [GET,POST,PATCH,DELETE] http://localhost:7071/api/addresses/{id?}
[api]
[api] Customers: [GET,POST,PATCH,DELETE] http://localhost:7071/api/customers/{id?}
[api]
[api] Engineers: [GET,POST,PATCH,DELETE] http://localhost:7071/api/engineers/{id?}
[api]
[api] Jobs: [GET,POST,PATCH,DELETE] http://localhost:7071/api/jobs/{id?}
[api]
[api] TimeDataCommand: [POST,PATCH,DELETE] http://localhost:7071/api/timeDataCommand/{id?}
[api]
[api] TimeDataQuery: [GET] http://localhost:7071/api/timeDataQuery
[api]
[api] For detailed output, run func with --verbose flag.
[run] [dumber] Starting dumber bundler v2.1.1 https://dumber.js.org
[run] [20:25:42] Using gulpfile C:\Dev\srdavidson\mobile\gulpfile.js
[run] [20:25:42] Starting 'default'...
[run] [20:25:42] Starting 'clean'...
[run] [20:25:42] Finished 'clean' after 72 ms
[run] [20:25:42] Starting 'build'...
[run] [dumber] 2.0.0-beta.8 @aurelia/dialog
[run] [dumber] 2.0.0-beta.8 @aurelia/router
[run] [dumber] 2.0.0-beta.8 @aurelia/runtime-html
[run] [dumber] 2.0.0-beta.8 aurelia
[run] [dumber] 2.6.2 tslib
[run] [dumber] 2.0.0-beta.8 @aurelia/fetch-client
[run] [dumber] 2.0.0-beta.8 @aurelia/kernel
[run] [dumber] 2.0.0-beta.8 @aurelia/metadata
[run] [dumber] 2.0.0-beta.8 @aurelia/platform
[run] [dumber] 2.0.0-beta.8 @aurelia/platform-browser
[run] [dumber] 2.0.0-beta.8 @aurelia/route-recognizer
[run] [dumber] 2.0.0-beta.8 @aurelia/runtime
[run] [dumber] 2.1.1 dumber
[run] Update index.html with entry.bundle.js
[run] [20:25:46] Write app-bundle.js
[run] [20:25:46] Write entry.bundle.js
[run] [20:25:46] Finished 'build' after 4.71 s
[run] [20:25:46] Starting 'startServer'...
[run]
[run] Dev server is started at: http://localhost:10000
[run]
[run] [20:25:46] Finished 'startServer' after 7.36 ms
[run] [20:25:46] Starting 'watch'...
[swa] ✔ http://localhost:10000 validated successfully
[swa] - Waiting for http://localhost:7071 to be ready
[swa] ✔ http://localhost:7071 validated successfully
[swa]
[swa] Using dev server for static content:
[swa] http://localhost:10000
[swa]
[swa] Serving API:
[swa] C:\Dev\srdavidson\api
[swa]
[swa] Azure Static Web Apps emulator started at http://localhost:4280. Press CTRL+C to exit.
but when I use the debug launch profile I get this in a new terminal window
#Terminal Window 1
* Executing task: npm install
up to date, audited 5 packages in 1s
found 0 vulnerabilities
* Terminal will be reused by tasks, press any key to close it.
* Executing task: func host start
Azure Functions Core Tools
Core Tools Version: 4.0.5455 Commit hash: N/A (64-bit)
Function Runtime Version: 4.27.5.21554
[2023-12-06T20:26:50.011Z] Debugger listening on ws://127.0.0.1:9229/cd150cf1-0c5a-4af3-bba2-24b096113779
[2023-12-06T20:26:50.014Z] For help, see: https://nodejs.org/en/docs/inspector
[2023-12-06T20:26:50.016Z] Debugger attached.
[2023-12-06T20:26:50.246Z] Worker process started and initialized.
[2023-12-06T20:26:50.433Z] Debugger attached.
Functions:
Addresses: [GET,POST,PATCH,DELETE] http://localhost:7071/api/addresses/{id?}
Customers: [GET,POST,PATCH,DELETE] http://localhost:7071/api/customers/{id?}
Engineers: [GET,POST,PATCH,DELETE] http://localhost:7071/api/engineers/{id?}
Jobs: [GET,POST,PATCH,DELETE] http://localhost:7071/api/jobs/{id?}
TimeDataCommand: [POST,PATCH,DELETE] http://localhost:7071/api/timeDataCommand/{id?}
TimeDataQuery: [GET] http://localhost:7071/api/timeDataQuery
For detailed output, run func with --verbose flag.
and this in a second terminal window
#Terminal Window 2
Welcome to Azure Static Web Apps CLI (1.1.6)
Using configuration "mobile" from file:
swa-cli.config.json
***********************************************************************
* WARNING: This emulator may not match the cloud environment exactly. *
* Always deploy and test your app in Azure. *
***********************************************************************
[run]
[run] > [email protected] start
[run] > gulp
[run]
[swa]
[swa] Found configuration file:
[swa] C:\Dev\srdavidson\mobile\staticwebapp.config.json
[swa]
[swa] - Waiting for http://localhost:7071 to be ready
[swa] ✔ http://localhost:7071 validated successfully
[swa]
[swa] Serving static content:
[swa] C:\Dev\srdavidson\mobile
[swa]
[swa] Using dev server for API:
[swa] http://localhost:7071
[swa]
[swa] Azure Static Web Apps emulator started at http://localhost:4280. Press CTRL+C to exit.
at this point I get this dialog
#Terminal Window 2 (cont.)
[swa]
[swa]
[run] [dumber] Starting dumber bundler v2.1.1 https://dumber.js.org
[run] [20:27:04] Using gulpfile C:\Dev\srdavidson\mobile\gulpfile.js
[run] [20:27:04] Starting 'default'...
[run] [20:27:04] Starting 'clean'...
[run] [20:27:04] Finished 'clean' after 42 ms
[run] [20:27:04] Starting 'build'...
[run] [dumber] 2.0.0-beta.8 @aurelia/dialog
[run] [dumber] 2.0.0-beta.8 @aurelia/router
[run] [dumber] 2.0.0-beta.8 @aurelia/runtime-html
[run] [dumber] 2.0.0-beta.8 aurelia
[run] [dumber] 2.6.2 tslib
[run] [dumber] 2.0.0-beta.8 @aurelia/fetch-client
[run] [dumber] 2.0.0-beta.8 @aurelia/kernel
[run] [dumber] 2.0.0-beta.8 @aurelia/metadata
[run] [dumber] 2.0.0-beta.8 @aurelia/platform
[run] [dumber] 2.0.0-beta.8 @aurelia/platform-browser
[run] [dumber] 2.0.0-beta.8 @aurelia/route-recognizer
[run] [dumber] 2.0.0-beta.8 @aurelia/runtime
[run] [dumber] 2.1.1 dumber
[run] Update index.html with entry.bundle.js
[run] [20:27:09] Write app-bundle.js
[run] [20:27:09] Write entry.bundle.js
[run] [20:27:09] Finished 'build' after 4.23 s
[run] [20:27:09] Starting 'startServer'...
[run]
[run] Dev server is started at: http://localhost:10000
[run]
[run] [20:27:09] Finished 'startServer' after 9.97 ms
[run] [20:27:09] Starting 'watch'...
Two things stand out about this:
- When running the cli, the process logs "Waiting for http://localhost:10000" but the debugger logs "Waiting for http://localhost:7071 to be ready"
- The operations are out of sequence, the cli runs the app code first and then starts the emulator, but the debugger starts the emulator before running the app code
Having said all that, I can debug the api but unsurprisingly, I cannot debug the spa code. The launch.json file looks okay as far as I can tell.
{
"version": "0.2.0",
"configurations": [
{
"name": "Mobile",
"request": "launch",
"cwd": "${workspaceFolder}/mobile",
"runtimeArgs": [
"run-script",
"start"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"serverReadyAction":{
"action": "debugWithEdge",
"pattern": "Dev server is started at: ([0-9]+)",
"uriFormat": "http://localhost:%s",
"webRoot": "${workspaceFolder}/mobile",
"killOnServerStop": false
}
},
{
"name": "Attach to Node Functions",
"type": "node",
"request": "attach",
"port": 9229,
"preLaunchTask": "func: host start",
"cwd":"${workspaceFolder}/api"
}
]
}
from vscode-azurestaticwebapps.
This may be a dumb question, but the error makes me have to ask... Do you have Edge installed? I think the launch.json indicates that it's trying to debug using Edge.
from vscode-azurestaticwebapps.
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
from vscode-azurestaticwebapps.
Related Issues (20)
- Zanega Browser HOT 4
- [Bug] Azure Static Web Apps Extension, bad credentials error message HOT 2
- Issue with Creating Static Web App - Error: "[Provider "/subscriptions/<mySubscriptionID>/providers/Microsoft.Resources" does not have resource type "resourceGroups"]" HOT 3
- hhhhhh HOT 2
- Unable to debug Blazor app with function in WSL HOT 2
- Internal error: 'branchDataProvider.getResourceltem' threw exception Cannot read properties of null (reading 'contextValuesToAdd') HOT 18
- Reboot.txt HOT 1
- REMOVE.md HOT 1
- fix? HOT 2
- Itens HOT 2
- Error while hosting static web app HOT 2
- vscode stopped while running in debug mode HOT 2
- [Suggestion] It would be better to open the "Environment Variables" page after clicking "Open in Portal" for the "Application Settings" node
- Voice Recognition HOT 2
- Internal error: 'branchDataProvider.getResourceltem' threw exception Cannot read properties of null (reading 'contextValuesToAdd') HOT 3
- How do I create an app with no api? HOT 1
- hvv HOT 2
- Static Web App: Bad Credentials error HOT 2
- AZURE HOT 2
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 vscode-azurestaticwebapps.