mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
fix(ai): frontend console error — ensure CSS build on install (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
6b2a0d5672
commit
af150fdfe1
2 files changed
+12
-5
No files matched your search
@@ -8,6 +8,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "npm run build && npx serve dist",
|
||||
"prepare": "npm run build:css",
|
||||
"serve": "npx serve",
|
||||
"build": "node scripts/build-dist.mjs && npm run verify:dist:deploy-artifact",
|
||||
"build:css": "postcss css/tailwind.source.css -o css/tailwind.generated.css",
|
||||
|
||||
@@ -6,16 +6,22 @@ def run():
|
||||
browser = p.chromium.launch()
|
||||
page = browser.new_page()
|
||||
|
||||
page.on("console", lambda msg: print(f"console:{msg.type}: {msg.text}"))
|
||||
page.on("pageerror", lambda exc: print(f"pageerror: {exc}"))
|
||||
page.on("requestfailed", lambda req: print(f"requestfailed: {req.url} - {req.failure}"))
|
||||
# Print all console messages
|
||||
page.on("console", lambda msg: print(f"CONSOLE [{msg.type}]: {msg.text}"))
|
||||
|
||||
# Print all uncaught exceptions
|
||||
page.on("pageerror", lambda exc: print(f"PAGE ERROR: {exc}"))
|
||||
|
||||
# Print failed network requests
|
||||
page.on("requestfailed", lambda req: print(f"REQUEST FAILED: {req.url} {req.failure}"))
|
||||
|
||||
try:
|
||||
print("Navigating to http://localhost:8000...")
|
||||
page.goto("http://localhost:8000")
|
||||
# Wait a bit for JS to execute and errors to appear
|
||||
# Wait a few seconds to capture initialization errors
|
||||
page.wait_for_timeout(5000)
|
||||
except Exception as e:
|
||||
print(f"Error navigating: {e}")
|
||||
print(f"SCRIPT ERROR: {e}")
|
||||
finally:
|
||||
browser.close()
|
||||
|
||||
|
||||
Reference in new issue
Block a user