{"record":{"id":"684ec6021f0a43fb","repo":"Kong/insomnia","slug":"no-module-is-found-for-modulename","errorCode":null,"errorMessage":"no module is found for \"${moduleName}\"","messagePattern":"no module is found for \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-testing/src/run/run.ts","lineNumber":43,"sourceCode":"        'util',\n        'url',\n        'punycode',\n        'querystring',\n        'string_decoder',\n        'stream',\n        'timers',\n        'events',\n        // follows should be npm modules\n        // but they are moved to here to avoid introducing additional dependencies\n      ].includes(moduleName)\n    ) {\n      return require(moduleName);\n    } else if (['atob', 'btoa'].includes(moduleName)) {\n      return moduleName === 'atob' ? atob : btoa;\n    } else if (externalModules.has(moduleName)) {\n      const externalModule = externalModules.get(moduleName);\n      if (!externalModule) {\n        throw Error(\\`no module is found for \"$\\{moduleName}\"\\`);\n      }\n      return externalModule;\n    }\n  \n    throw Error(\\`no module is found for \"$\\{moduleName}\"\\`);\n  };\n\n  require = requireInterceptor;\n  `;\n\n  // Ensure that the require is at the top of the file\n  return `${injectScript}\\n${source}`;\n}\n\n// declare var insomnia: Insomnia;\nconst runInternal = async <TReturn, TNetworkResponse>(\n  testSrc: string | string[],\n  options: InsomniaOptions<TNetworkResponse>,","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-testing/src/run/run.ts#L25-L61","documentation":"Error \"no module is found for \"${moduleName}\"\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-testing/src/run/run.ts:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}