{"record":{"id":"57155ecc8f2e20f6","repo":"yarnpkg/yarn","slug":"requestmanagernotsetuphar","errorCode":null,"errorMessage":"requestManagerNotSetupHAR","messagePattern":"requestManagerNotSetupHAR","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/util/request-manager.js","lineNumber":546,"sourceCode":"\n  /**\n   * Remove an item from the queue. Create it's request options and execute it.\n   */\n\n  shiftQueue() {\n    if (this.running >= this.max || !this.queue.length) {\n      return;\n    }\n\n    const opts = this.queue.shift();\n\n    this.running++;\n    this.execute(opts);\n  }\n\n  saveHar(filename: string) {\n    if (!this.captureHar) {\n      throw new Error(this.reporter.lang('requestManagerNotSetupHAR'));\n    }\n    // No request may have occurred at all.\n    this._getRequestModule();\n    invariant(this._requestCaptureHar != null, 'request-capture-har not setup');\n    this._requestCaptureHar.saveHar(filename);\n  }\n}\n","sourceCodeStart":528,"sourceCodeEnd":554,"githubUrl":"https://github.com/yarnpkg/yarn/blob/c2dda503f3759b5be5f0e24ecd9cf5c97a540147/src/util/request-manager.js#L528-L554","documentation":"Error \"requestManagerNotSetupHAR\" thrown in yarnpkg/yarn.","triggerScenarios":"Yarn is asked to record or replay HAR traffic but the request manager has not been set up with HAR capture in src/util/request-manager.js.","commonSituations":"Occurs when HAR capture/save is invoked without enabling request capture first (missing --har setup or internal ordering bug).","solutions":["saveHar() was called without HAR capture being enabled. Start yarn with the --har flag (or set the corresponding option) so the request manager sets up request-capture-har, then rerun.","If calling saveHar from your own tooling, ensure config.requestManager.captureHar is true before executing requests."],"exampleFix":"yarn install --har","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c2dda503f3759b5be5f0e24ecd9cf5c97a540147","analyzedAt":"2026-08-13T04:17:06.305Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}