{"record":{"id":"fe62eab7d23bbd4a","repo":"transloadit/uppy","slug":"the-provider-option-provideroptions-deprecated","errorCode":null,"errorMessage":"The Provider option \"providerOptions.${deprecated}\" is no longer supported. Please use the option \"${deprecatedOptions[deprecated]}\" instead.","messagePattern":"The Provider option \"providerOptions\\.(.+?)\" is no longer supported\\. Please use the option \"(.+?)\" instead\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@uppy/companion/src/config/companion.ts","lineNumber":123,"sourceCode":"  const { providerOptions, server, uploadUrls } = companionOptions\n\n  // see https://github.com/transloadit/uppy/issues/4271\n  // todo fix the code so we can allow `/`\n  if (server.path === '/') {\n    throw new Error(\n      \"If you want to use '/' as server.path, leave the 'path' variable unset\",\n    )\n  }\n\n  if (providerOptions) {\n    const deprecatedOptions: Record<string, string> = {\n      microsoft: 'providerOptions.onedrive',\n      google: 'providerOptions.drive',\n      s3: 's3',\n    }\n    Object.keys(deprecatedOptions).forEach((deprecated) => {\n      if (Object.hasOwn(providerOptions, deprecated)) {\n        throw new Error(\n          `The Provider option \"providerOptions.${deprecated}\" is no longer supported. Please use the option \"${deprecatedOptions[deprecated]}\" instead.`,\n        )\n      }\n    })\n  }\n\n  if (uploadUrls == null || uploadUrls.length === 0) {\n    if (process.env['NODE_ENV'] === 'production') {\n      throw new Error('uploadUrls is required')\n    }\n    logger.error(\n      'Running without uploadUrls is a security risk and Companion will refuse to start up when running in production (NODE_ENV=production)',\n      'startup.uploadUrls',\n    )\n  }\n\n  const { corsOrigins } = companionOptions\n  if (corsOrigins == null) {","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/companion/src/config/companion.ts#L105-L141","documentation":"Companion renamed its provider options: top-level providerOptions.microsoft/google/s3 were restructured into providerOptions.onedrive/providerOptions.drive and an s3 section. Using the old names triggers this startup error with the suggested replacement.","triggerScenarios":"Passing companionOptions like { providerOptions: { microsoft: {...} } } or { google: {...} } / { s3: {...} } in the old shape.","commonSituations":"Upgrading Companion from an older major version without migrating config; following outdated documentation or blog posts.","solutions":["Rename providerOptions.microsoft to providerOptions.onedrive","Rename providerOptions.google to providerOptions.drive","Move s3 options to the new top-level s3 config section as indicated by the message"],"exampleFix":"// before\nproviderOptions: { microsoft: { credentials: {...} } }\n\n// after\nproviderOptions: { onedrive: { credentials: {...} } }","handlingStrategy":"validation","validationCode":"const OLD = { microsoft: 'onedrive', google: 'drive' }\nfor (const [oldK, newK] of Object.entries(OLD)) {\n  if (providerOptions[oldK]) { providerOptions[newK] = providerOptions[oldK]; delete providerOptions[oldK] }\n}","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Migrate config keys on Companion major upgrades","Keep configs in version control and diff at upgrade time","Follow the migration notes in release changelogs"],"tags":["companion","configuration","migration","breaking-change"],"backgroundTag":"deprecated-option-renamed","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}