{"record":{"id":"7b42911e64e448b2","repo":"grafana/k6","slug":"cdnjs-com-special-urls-are-no-longer-supported","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/loader/loader.go","lineNumber":74,"sourceCode":"\n\tif strings.Contains(moduleSpecifier, \"://\") {\n\t\tu, err := url.Parse(moduleSpecifier)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif u.Scheme != \"file\" && u.Scheme != \"https\" {\n\t\t\treturn nil,\n\t\t\t\tfmt.Errorf(\"only supported schemes for imports are file and https, %s has `%s`\",\n\t\t\t\t\tmoduleSpecifier, u.Scheme)\n\t\t}\n\t\tif u.Scheme == \"file\" && pwd.Scheme == \"https\" {\n\t\t\treturn nil, fmt.Errorf(\"origin (%s) not allowed to load local file: %s\", pwd, moduleSpecifier)\n\t\t}\n\t\treturn u, err\n\t}\n\n\tif strings.HasPrefix(moduleSpecifier, \"cdnjs.com\") {\n\t\treturn nil, fmt.Errorf(\"cdnjs.com 'special' urls are no longer supported - please use real ones. \" +\n\t\t\t\"You can get yours by going to cdnjs and copy-pasting the full url to the actual JavaScript file\")\n\t}\n\tif strings.HasPrefix(moduleSpecifier, \"github.com\") {\n\t\treturn nil, fmt.Errorf(\"github.com 'special' urls are no longer supported - please use real ones. \" +\n\t\t\t\"You can get yours by going to github and copy-pasting the full url to the actual raw JavaScript file\")\n\t}\n\treturn nil, unresolvableURLError(moduleSpecifier)\n}\n\nfunc resolveFilePath(pwd *url.URL, moduleSpecifier string) (*url.URL, error) {\n\tif pwd.Opaque != \"\" { // this is a loader reference\n\t\tbase, dir, _ := strings.Cut(pwd.Opaque, \"/\")\n\t\tif moduleSpecifier[0] == '/' {\n\t\t\treturn &url.URL{Opaque: path.Join(base, moduleSpecifier)}, nil\n\t\t}\n\t\treturn &url.URL{Opaque: path.Join(base, path.Join(path.Dir(dir+\"/\"), moduleSpecifier))}, nil\n\t}\n","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/loader/loader.go#L56-L92","documentation":"An explicit deprecation guard in Resolve. k6 used to resolve shorthand cdnjs.com URLs; it now rejects them because resolution is ambiguous. It fires whenever a module specifier starts with 'cdnjs.com'.","triggerScenarios":"Thrown at internal/loader/loader.go:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Browse cdnjs, open the actual JavaScript file, and copy its full https:// URL","Replace the 'cdnjs.com/...' specifier with the concrete https://cdnjs.cloudflare.com/... file URL"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}