{"record":{"id":"c6134fdfbd503c97","repo":"grafana/k6","slug":"k6-experimental-redis-has-been-removed-please-mig","errorCode":null,"errorMessage":"k6/experimental/redis has been removed. Please migrate to the new version by changing your import to 'k6/x/redis'. Read more here: https://grafana.com/docs/k6/latest/javascript-api/k6-x-redis","messagePattern":"k6/experimental/redis has been removed\\. Please migrate to the new version by changing your import to 'k6/x/redis'\\. Read more here: https://grafana\\.com/docs/k6/latest/javascript-api/k6-x-redis","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/jsmodules.go","lineNumber":107,"sourceCode":"\n\t// external is always prefixed with `k6/x`\n\tfor _, e := range external {\n\t\tresult[e.Name] = e.Module\n\t}\n\n\treturn result\n}\n\ntype removedModule struct {\n\terrMsg string\n}\n\nfunc newRemovedModule(errMsg string) modules.Module {\n\treturn &removedModule{errMsg: errMsg}\n}\n\nfunc (rm *removedModule) NewModuleInstance(vu modules.VU) modules.Instance {\n\tcommon.Throw(vu.Runtime(), errors.New(rm.errMsg))\n\n\treturn nil\n}\n\ntype warnExperimentalModule struct {\n\tonce sync.Once\n\tmsg  string\n\tbase modules.Module\n}\n\nfunc newWarnExperimentalModule(base modules.Module, msg string) modules.Module {\n\treturn &warnExperimentalModule{\n\t\tmsg:  msg,\n\t\tbase: base,\n\t}\n}\n\nfunc (w *warnExperimentalModule) NewModuleInstance(vu modules.VU) modules.Instance {","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/js/jsmodules.go#L89-L125","documentation":"The k6/experimental/redis module was removed from the core distribution. Its registry entry is a stub (removedModule) whose NewModuleInstance throws this message the moment the import is instantiated, directing users to the k6/x/redis module.","triggerScenarios":"`import redis from 'k6/experimental/redis'` (or `import redis from 'k6/experimental/redis'` variants) in any script run on a current k6 build.","commonSituations":"Scripts written against k6 < v0.5x after a k6 upgrade; tutorials referencing the experimental module path.","solutions":["Change the import to 'k6/x/redis': `import redis from 'k6/x/redis'` (bundled with k6, no custom build needed)","Adjust field usage per the linked migration docs if the client API changed"],"exampleFix":"// before\nimport redis from 'k6/experimental/redis';\n\n// after\nimport redis from 'k6/x/redis';","handlingStrategy":"validation","validationCode":"# Block removed-module imports before running\ngrep -nE \"from 'k6/experimental/(redis|browser|grpc|timers|tracing|webcrypto)'\" script.js && { echo 'Removed module import found — migrate per error message' >&2; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After each k6 upgrade, grep the script tree for 'k6/experimental/' imports","Prefer stable module paths (k6/x/redis, k6/browser, k6/net/grpc) in all new code","Subscribe to k6 release notes; graduations and removals are announced there"],"tags":["javascript","modules","redis","migration","removed-feature"],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}