swa-cli.config.json "run" field <undefined>when "npm run vite:dev". Vite never runs
hthaigler opened this issue · 1 comments
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
[✅] (https://emojipedia.org/check-mark-button) 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.
When running swa start
the webapp frontend is never run. When looking at the logs, the run command is . The cli times out waiting for http://localhost:3000 since the run command is undefined and the vite is never run.
swa-cli.config.json
{
"$schema": "https://aka.ms/azure/static-web-apps-cli/schema",
"configurations": {
"bgpreconbasecamp": {
"appLocation": "webapp",
"outputLocation": "dist",
"appBuildCommand": "npm run vite:build",
"run": "npm run vite:dev",
"appDevserverUrl": "http://localhost:3000"
}
}
}
To Reproduce
Steps to reproduce the behavior:
- Go to swa-cli.config.json and copy in json object above.
- Type in command
swa start --verbose=silly
- Scroll down to logs
- See error:
- commands:
- swa: node "C:\Users\<USER>\AppData\Roaming\nvm\v18.19.0\node_modules\@azure\static-web-apps-cli\dist\msha\server.js"
- api: <undefined>
- dataApi: <undefined>
- run: <undefined>
Expected behavior
A clear and concise description of what you expected to happen.
Frontend should run with command npm run vite:dev
and serve to http://localhost:3000
Desktop (please complete the following information):
- OS: [e.g. iOS] Microsoft Windows 11
- Version [e.g. 22] 10.0.22621 Build 22621
Dupe of #782