ionic-team/ionicons
View on GitHubUncaught TypeError: Failed to construct 'URL': Invalid base URL
Open
#1032 opened on Dec 22, 2021
17 comments (17 comments)21 reactions (21 reactions)0 assignees (0 assignees)TypeScript17,256 stars (17,256 stars)2,083 forks (2,083 forks)batch import
help wanted
Description
Using Ionicons 6.0.0 with Ionic 6.0.1
Contributor guide
- Tech stack
- javascripttypescriptweb components
- Domain
- frontend
- Issue type
- bug
- DifficultyEstimated implementation difficulty for a new contributor, from 1 for very small changes to 5 for expert-level work.
- 3
- Estimated timeA rough time range for an experienced contributor to investigate, implement, test, and prepare a pull request.
- 1-3 hours
- Activity statusHow available the issue appears right now: fresh, active, stale, blocked, or waiting on maintainer input.
- stale
- ClarityHow clearly the issue explains the expected change, acceptance criteria, and next step.
- mostly clear
- Prerequisites
- None
- Newbie friendlinessA 1-100 score estimating how approachable this issue is for first-time contributors.
- 60
- Research direction
- The error 'Failed to construct URL: Invalid base URL' occurs in the icon loading process, likely in the web component's logic. Search for 'new URL(' in the source code (e.g., `src/` or `dist/`) to find where the base is passed. Check if the base is derived from a potentially undefined or invalid source, such as `document.baseURI` or `location.href`. Consider adding a fallback or validation to prevent this error when the base is invalid.