forked from trent_larson/crowd-funder-for-time-pwa
fix(build): resolve shell script export error in .env.development
Fixed malformed comment in .env.development that was causing "export: production).=: not a valid identifier" error in build scripts. The comment was split across lines, causing the shell to interpret " production)." as a variable assignment. - Removed malformed comment line that was breaking build:web script - Build script now successfully validates environment and starts server - Resolves issue preventing Playwright tests from running properly
This commit is contained in:
@@ -7,7 +7,7 @@ VITE_LOG_LEVEL=debug
|
||||
TIME_SAFARI_APP_TITLE="TimeSafari_Dev"
|
||||
VITE_APP_SERVER=http://localhost:8080
|
||||
# This is the claim ID for actions in the BVC project, with the JWT ID on this environment (not
|
||||
production).
|
||||
|
||||
|
||||
VITE_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HWE8FWHQ1YGP7GFZYYPS272F
|
||||
VITE_DEFAULT_ENDORSER_API_SERVER=http://localhost:3000
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -96,7 +96,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/assets": "^3.0.5",
|
||||
"@playwright/test": "^1.45.2",
|
||||
"@playwright/test": "^1.54.2",
|
||||
"@types/dom-webcodecs": "^0.1.7",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/assets": "^3.0.5",
|
||||
"@playwright/test": "^1.45.2",
|
||||
"@playwright/test": "^1.54.2",
|
||||
"@types/dom-webcodecs": "^0.1.7",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
|
||||
@@ -300,18 +300,20 @@ serve_build() {
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# Use a simple HTTP server to serve the build
|
||||
if command -v python3 &> /dev/null; then
|
||||
# Use a server that supports SPA routing (serves index.html for all routes)
|
||||
if command -v npx &> /dev/null; then
|
||||
log_info "Starting npx serve with SPA support on port 8080..."
|
||||
npx serve -s dist -l 8080
|
||||
elif command -v python3 &> /dev/null; then
|
||||
log_warn "Python HTTP server doesn't support SPA routing. Routes like /discover, /account will return 404."
|
||||
log_info "Starting Python HTTP server on port 8080..."
|
||||
cd dist && python3 -m http.server 8080
|
||||
elif command -v python &> /dev/null; then
|
||||
log_warn "Python HTTP server doesn't support SPA routing. Routes like /discover, /account will return 404."
|
||||
log_info "Starting Python HTTP server on port 8080..."
|
||||
cd dist && python -m SimpleHTTPServer 8080
|
||||
elif command -v npx &> /dev/null; then
|
||||
log_info "Starting npx serve on port 8080..."
|
||||
npx serve -s dist -l 8080
|
||||
else
|
||||
log_error "No suitable HTTP server found. Install Python or npx serve."
|
||||
log_error "No suitable HTTP server found. Install npx serve or Python."
|
||||
exit 5
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user