Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

First identify what returned 404: the request may be for a JavaScript bundle such as /assets/app.js, or for an application page such as /dashboard opened directly or refreshed. A missing bundle calls for checking the build, asset URL, and deployed files. A missing client-side page usually calls for a host fallback to index.html. A route rewrite cannot restore a JavaScript file that is absent from the deployment.

1. Identify the exact request that failed

Open your browser’s developer tools and inspect the Network panel while reproducing the problem. Record the full request path, status, any redirects, and the response type. The distinction is important: a request ending in .js is an asset request; a path such as /dashboard may be a client-side route.

  • If the page loads but a script request returns 404, troubleshoot the asset URL and deployed build.
  • If in-app navigation works but opening or refreshing a page URL returns 404, troubleshoot server-side routing.
  • If both fail, investigate each request separately; they may have different causes.

2. If a JavaScript bundle returns 404, verify the build and deployment

Confirm the file is in the production build

Run the project’s production build and inspect the generated output directory. Find the bundle named in the failed request. If it is not present in the build output, inspect the build configuration and the HTML or manifest that refers to it; a hosting rewrite will not create the missing file.

Make the host serve the right directory

Check the deployment platform’s configured publish or output directory against the directory actually produced by the build. The directory name depends on the framework and project configuration: dist is common, but it is not universal. Netlify’s guidance emphasizes matching the publish directory to the build output, and Vercel notes that a wrong output-directory setting can leave the platform serving an empty folder.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

After deployment, verify that the requested bundle exists in the files served by the active deployment, not just on your local machine. Compare the exact filename and path, including capitalization and directory segments.

Match the asset base path to where the app is hosted

An app deployed at a domain root and an app deployed under a repository or application subpath need not use the same asset URLs. Compare the script URL in the deployed HTML with the file’s location in the deployed output. If the app lives under a prefix, configure the framework’s public or base path to include it.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

For example, Vue CLI’s GitHub Pages guidance uses // as publicPath for a project hosted at https://<USERNAME>.github.io/<REPO>/. TanStack Router’s Vite deployment guidance likewise calls out matching Vite’s base setting to a subdirectory deployment. Vue CLI is in maintenance mode, so newer Vue projects should check the guidance for their current tooling.

3. If a page route returns 404, configure a client-side routing fallback

With history-based client-side routing, navigation can change the address in the browser without asking the server for a new document. But opening a route directly or refreshing it sends that route to the server. If the server has no matching file or route, it can return 404 even though the app’s in-page navigation works.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Configure the hosting platform to serve index.html for application routes that should be handled by the client router. Scope the fallback so that real static assets and API endpoints continue to receive their normal handling. A broad catch-all can make an asset or API request receive HTML instead of the expected JavaScript or data.

  • Netlify: Its documentation says history-based SPAs need a rewrite that serves index.html for requested URLs. The publish directory must also match the build output.
  • Vercel: Its guidance for Vite- or Create React App-style SPAs uses a catch-all rewrite to /index.html, with API paths excluded where appropriate. This generic SPA rule is not suitable for every framework; use the framework-specific routing guidance when it applies.
  • Vue CLI: History-mode routing requires the production server to fall back to index.html; setting publicPath addresses the deployment location of assets, not this server-routing requirement.
  • Azure Static Web Apps: Its routing configuration supports a fallback for client-side routes that do not correspond to deployed files.
  • Cloudflare Workers static assets: SPA not-found behavior can serve /index.html for unmatched navigation requests. Review how navigation and API requests are handled before enabling that behavior.

4. Check for mismatched files after a release

If the 404 began after a deployment, inspect the deployed HTML and note the exact bundle filename it references. Compare that name with the files in the active deployment. Content-hashed bundles change names when their contents change; HTML that points to a hash not present in the active deployment will produce a missing-asset request.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Netlify warns that code splitting or hashed filenames can cause references to break across atomic deploys when the HTML and assets being used do not align. Check the active deployment’s HTML and files before changing caching rules.

Consider browser and CDN caches separately

A cache can preserve an older page or asset reference. Azure Static Web Apps says its deployment cache invalidation is automatic, while a browser or separately configured CDN may still cache content. Check those layers if the failure differs between browsers, users, or cached and fresh sessions; do not assume that every host invalidates every external cache.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

5. Separate a custom-domain problem from a deployment problem

On Vercel, compare the deployment’s .vercel.app URL with the custom domain. If the deployment URL works and the custom domain does not, investigate domain and DNS configuration rather than assuming the bundle or application route is missing. On other hosts, use the equivalent platform-provided deployment URL where available; domain behavior and routing are platform-specific.

Match the symptom to the next check

Symptom Likely area Next check
A .js bundle URL returns 404 Asset base path, missing build output, wrong served directory, or stale filename reference Compare the requested URL with the build output and deployed files; verify the host’s output directory and deployment prefix.
In-app navigation works, but direct navigation or refresh returns 404 Server or platform does not route the client-side path to the app Configure a host-appropriate fallback to index.html for app routes, while preserving asset and API handling.
The failure starts after a release, often for a hashed chunk HTML and bundle files may not align, or a browser or separate CDN may retain cached content Compare the HTML-referenced hash with the active deployment’s files, then inspect relevant cache layers.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.