website
website copied to clipboard
Enable dash-site to check for running Firebase emulator
When I run the link checker a second time, the following error appears:
➜ website git:(fix-10464) dart run flutter_site check-links
Building package executable...
Built flutter_site:flutter_site.
Error: Port 5500 is already in use! Are you running the emulator elsewhere?
➜ website git:(fix-10464)
The Firebase emulator was still running because nothing told it to terminate. This, though, prevents the link checker from running.
Can the script either check for a running FIrebase emulator or terminate once a link check run completes?
@parlough, can this be closed?
I am also experiencing this issue. Here is a log:
afitch-macbookpro2:website afitch$ dart run flutter_site check-links
Building package executable...
Built flutter_site:flutter_site.
Starting the Firebase hosting emulator asynchronously...
(node:2191) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2209) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
⚠ emulators: You are not currently authenticated so some features may not work correctly. Please run firebase login to authenticate the CLI.
(node:2209) MetadataLookupWarning: received unexpected error = request to http://169.254.169.254/computeMetadata/v1/instance failed, reason: connect ENOTSUP 169.254.169.254:80 - Local (192.0.0.2:49733) code = ENOTSUP
⚠ hosting: Could not fetch web app configuration and there is no cached configuration on this machine. Check your internet connection and make sure you are authenticated. To continue, you must call firebase.initializeApp({...}) in your code before using Firebase.
⚠ emulators: The Emulator UI is not starting, either because none of the running emulators have a UI component or the Emulator UI cannot determine the Project ID. Pass the --project flag to specify a project.
┌─────────────────────────────────────────────────────────────┐
│ ✔ All emulators ready! It is now safe to connect your app. │
└─────────────────────────────────────────────────────────────┘
┌──────────┬────────────────┐
│ Emulator │ Host:Port │
├──────────┼────────────────┤
│ Hosting │ 127.0.0.1:5500 │
└──────────┴────────────────┘
Emulator Hub running at 127.0.0.1:4400
Other reserved ports: 4500
Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.
Done crawling.
http://localhost:5500/ui/animations
- (5163:4) 'Monitori..' => http://localhost:5500/ui/animations#monitoring (HTTP 200 but missing anchor)
http://localhost:5500/ui/animations/tutorial
- (4756:0) 'Animatio..' => http://localhost:5500/ui/animations/tutorial#animationcontroller (HTTP 200 but missing anchor)
Warnings. Checked 668157 links, 1509 destination URLs (2781 ignored), 2 have warnings.
Shutting down Firebase hosting emulator...
Done!
afitch-macbookpro2:website afitch$ dart run flutter_site check-links
Building package executable...
Built flutter_site:flutter_site.
Error: Port 5500 is already in use! Are you running the emulator elsewhere?
Quick fix for anyone stuck (Mac):
- Open terminal, enter the following, and jot down the PID:
lsof -i :5500
- Once you have the PID, use the following command to terminate the process
sudo kill -9 <PID>