{"record":{"id":"1d83e635329c340c","repo":"gatsbyjs/gatsby","slug":"external-link-to-was-detected-in-a-link-compone","errorCode":null,"errorMessage":"External link ${to} was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links","messagePattern":"External link (.+?) was detected in a Link component\\. Use the Link component only for internal links\\. See: https://gatsby\\.dev/internal-links","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-link/src/index.js","lineNumber":154,"sourceCode":"    const {\n      to,\n      getProps = this.defaultGetProps,\n      onClick,\n      onMouseEnter,\n      /* eslint-disable no-unused-vars */\n      activeClassName: $activeClassName,\n      activeStyle: $activeStyle,\n      innerRef: $innerRef,\n      partiallyActive,\n      state,\n      replace,\n      _location,\n      /* eslint-enable no-unused-vars */\n      ...rest\n    } = this.props\n\n    if (process.env.NODE_ENV !== `production` && !isLocalLink(to)) {\n      console.warn(\n        `External link ${to} was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links`\n      )\n    }\n\n    const prefixedTo = rewriteLinkPath(to, _location.pathname)\n    if (!isLocalLink(prefixedTo)) {\n      return <a href={prefixedTo} {...rest} />\n    }\n\n    return (\n      <ReachRouterLink\n        to={prefixedTo}\n        state={state}\n        getProps={getProps}\n        innerRef={this.handleRef}\n        onMouseEnter={e => {\n          if (onMouseEnter) {\n            onMouseEnter(e)","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-link/src/index.js#L136-L172","documentation":"Dev-only warning from gatsby-link's render: isLocalLink(to) is false, meaning the `to` prop is an external/absolute URL that the client-side router cannot navigate; the router still renders it but behavior is undefined.","triggerScenarios":"Thrown at packages/gatsby-link/src/index.js:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a plain <a href> for external links","Keep <Link> for internal site paths only (https://gatsby.dev/internal-links)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}