{"record":{"id":"1faf6a9e1f69a0b4","repo":"gatsbyjs/gatsby","slug":"gatsby-plugin-remove-trailing-slashes-gatsby-now","errorCode":null,"errorMessage":"gatsby-plugin-remove-trailing-slashes: Gatsby now has a trailingSlash option. Learn more at https://gatsby.dev/trailing-slash","messagePattern":"gatsby-plugin-remove-trailing-slashes: Gatsby now has a trailingSlash option\\. Learn more at https://gatsby\\.dev/trailing-slash","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deprecated-packages/gatsby-plugin-remove-trailing-slashes/src/gatsby-node.js","lineNumber":19,"sourceCode":"// Replacing '/' would result in empty string which is invalid\nconst replacePath = _path => (_path === `/` ? _path : _path.replace(/\\/$/, ``))\n\nexports.onCreatePage = ({ page, actions }) => {\n  const { createPage, deletePage } = actions\n\n  return new Promise(resolve => {\n    const oldPage = Object.assign({}, page)\n    page.path = replacePath(page.path)\n    if (page.path !== oldPage.path) {\n      deletePage(oldPage)\n      createPage(page)\n    }\n    resolve()\n  })\n}\n\nexports.onPreInit = ({ reporter }) => {\n  reporter.warn(\n    `gatsby-plugin-remove-trailing-slashes: Gatsby now has a trailingSlash option. Learn more at https://gatsby.dev/trailing-slash`\n  )\n}\n","sourceCodeStart":1,"sourceCodeEnd":23,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/deprecated-packages/gatsby-plugin-remove-trailing-slashes/src/gatsby-node.js#L1-L23","documentation":"Deprecation notice emitted by the plugin's onPreInit: gatsby core now ships a built-in `trailingSlash` config option, so this deprecated wrapper plugin is unnecessary. The plugin still runs (it rewrites page paths by stripping trailing slashes); the warning only points to the replacement.","triggerScenarios":"Thrown at deprecated-packages/gatsby-plugin-remove-trailing-slashes/src/gatsby-node.js:19 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove gatsby-plugin-remove-trailing-slashes","Set `trailingSlash: \"never\"` in gatsby-config.js instead"],"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-14T05:17:10.506Z"}