grafana/k6 · error
github.com 'special' urls are no longer supported - please u
Error message
github.com 'special' urls are no longer supported - please use real ones. You can get yours by going to github and copy-pasting the full url to the actual raw JavaScript file
What it means
Error "github.com 'special' urls are no longer supported - please use real ones. You can get yours by going to github and copy-pasting the full url to the actual raw JavaScript file" thrown in grafana/k6.
Source
Thrown at internal/loader/loader.go:78
return nil, err
}
if u.Scheme != "file" && u.Scheme != "https" {
return nil,
fmt.Errorf("only supported schemes for imports are file and https, %s has `%s`",
moduleSpecifier, u.Scheme)
}
if u.Scheme == "file" && pwd.Scheme == "https" {
return nil, fmt.Errorf("origin (%s) not allowed to load local file: %s", pwd, moduleSpecifier)
}
return u, err
}
if strings.HasPrefix(moduleSpecifier, "cdnjs.com") {
return nil, fmt.Errorf("cdnjs.com 'special' urls are no longer supported - please use real ones. " +
"You can get yours by going to cdnjs and copy-pasting the full url to the actual JavaScript file")
}
if strings.HasPrefix(moduleSpecifier, "github.com") {
return nil, fmt.Errorf("github.com 'special' urls are no longer supported - please use real ones. " +
"You can get yours by going to github and copy-pasting the full url to the actual raw JavaScript file")
}
return nil, unresolvableURLError(moduleSpecifier)
}
func resolveFilePath(pwd *url.URL, moduleSpecifier string) (*url.URL, error) {
if pwd.Opaque != "" { // this is a loader reference
base, dir, _ := strings.Cut(pwd.Opaque, "/")
if moduleSpecifier[0] == '/' {
return &url.URL{Opaque: path.Join(base, moduleSpecifier)}, nil
}
return &url.URL{Opaque: path.Join(base, path.Join(path.Dir(dir+"/"), moduleSpecifier))}, nil
}
// The file is in format like C:/something/path.js. But this will be decoded as scheme `C`
// ... which is not what we want, we want it to be decoded as file:///C:/something/path.js
if filepath.VolumeName(moduleSpecifier) != "" {
moduleSpecifier = "/" + moduleSpecifierView on GitHub (pinned to 01ffac6f24)
Solutions
- Go to github.com, open the raw JavaScript file (raw.githubusercontent.com URL) and copy that full https:// URL
- Replace the 'github.com/owner/repo/...' shorthand with the explicit raw file URL
- Alternatively vendor the file locally and import it with a relative path
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/loader/loader.go:78 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/317ce99fb80ab38e.
Report an issue: GitHub.