{"record":{"id":"584d4e6a7b776456","repo":"facebook/relay","slug":"relay-runtime-requires-mapstr-setstr-promises","errorCode":null,"errorMessage":"relay-runtime requires ${[mapStr, setStr, promiseStr, objStr].filter(Boolean).join(', and ')} to exist. Use a polyfill to provide these for older browsers.","messagePattern":"relay-runtime requires (.+?) to exist\\. Use a polyfill to provide these for older browsers\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/relay-runtime/index.js","lineNumber":264,"sourceCode":"  UpdatableFragment,\n  UpdatableQuery,\n  Variables,\n  VariablesOf,\n} from './util/RelayRuntimeTypes';\nexport type {Local3DPayload} from './util/createPayloadFor3DField';\nexport type {Direction} from './util/getPaginationVariables';\nexport type {RequestIdentifier} from './util/getRequestIdentifier';\nexport type {ResolverFunction} from './util/ReaderNode';\nexport type {IdOf, RelayResolverValue, Result} from './experimental';\n\n// As early as possible, check for the existence of the JavaScript globals which\n// Relay Runtime relies upon, and produce a clear message if they do not exist.\nif (__DEV__) {\n  const mapStr = typeof Map !== 'function' ? 'Map' : null;\n  const setStr = typeof Set !== 'function' ? 'Set' : null;\n  const promiseStr = typeof Promise !== 'function' ? 'Promise' : null;\n  const objStr = typeof Object.assign !== 'function' ? 'Object.assign' : null;\n  if (mapStr || setStr || promiseStr || objStr) {\n    throw new Error(\n      `relay-runtime requires ${[mapStr, setStr, promiseStr, objStr]\n        .filter(Boolean)\n        .join(', and ')} to exist. ` +\n        'Use a polyfill to provide these for older browsers.',\n    );\n  }\n}\n\nconst {\n  areEqualSelectors,\n  createNormalizationSelector,\n  createReaderSelector,\n  getDataIDsFromFragment,\n  getDataIDsFromObject,\n  getPluralSelector,\n  getSelector,\n  getSelectorsFromObject,","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/facebook/relay/blob/668b1b85e06261aa3b58dabfc51f8b5524a70955/packages/relay-runtime/index.js#L246-L282","documentation":"relay-runtime requires Map, Set, Promise, and Object.assign at load time. This dev-mode check runs when the module is imported and throws immediately if any of these ES6 built-ins are missing, telling you to polyfill them for older browsers.","triggerScenarios":"Importing relay-runtime (or react-relay) into a bundle executed by an environment lacking ES6 globals: IE11, old Android WebView, legacy Node (<4), or a bundle that ships raw untranspiled code to old targets without core-js polyfills.","commonSituations":"Supporting legacy browsers with babel but no polyfill for built-ins (only syntax transform); targeted bundler config (browserslist) set to ancient browsers; embedding Relay in a sandboxed/legacy JS runtime.","solutions":["Add core-js polyfills at app entry: import 'core-js/stable' or targeted imports of Map, Set, Promise, and Object.assign","Update browserslist targets (e.g. \"> 0.25%, not dead\") so the bundler's useBuiltIns automatically includes needed polyfills","Drop IE11/legacy support if possible so no polyfill layer is needed","Verify Node version is >= modern requirement if the error appears server-side"],"exampleFix":"// before (app entry)\nimport React from 'react';\n// after\nimport 'core-js/stable';\nimport React from 'react';","handlingStrategy":"fallback","validationCode":"const missing = [\n  typeof Map !== 'function' && 'Map',\n  typeof Set !== 'function' && 'Set',\n  typeof Promise !== 'function' && 'Promise',\n  typeof Object.assign !== 'function' && 'Object.assign',\n].filter(Boolean);\nif (missing.length) console.warn('Polyfills required:', missing.join(', '));","typeGuard":null,"tryCatchPattern":"try {\n  const {Environment} = require('relay-runtime');\n} catch (e) {\n  if (/requires .* to exist/.test(e.message)) {\n    await import('core-js/stable');\n    // re-attempt import or reload\n  }\n}","preventionTips":["Import core-js/stable (or targeted polyfills) as the first line of your app entry","Keep browserslist targets modern or ensure useBuiltIns:'usage' is configured","Test legacy browsers in CI if you claim support","Don't ship untranspiled node_modules code to old targets"],"tags":["polyfill","browser-compatibility","es6","relay-runtime"],"backgroundTag":"missing-es6-polyfill","analyzedSha":"668b1b85e06261aa3b58dabfc51f8b5524a70955","analyzedAt":"2026-09-02T19:57:20.783Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}