gatsbyjs/gatsby · error

The netlify-cms package is deprecated, please install netlif

Error message

The netlify-cms package is deprecated, please install netlify-cms-app instead. You can do this by running "npm install netlify-cms-app"

What it means

onPreInit deprecation notice from gatsby-plugin-netlify-cms: require.resolve succeeded for the monolithic netlify-cms package, which is deprecated in favour of netlify-cms-app that the plugin actually integrates with.

Source

Thrown at deprecated-packages/gatsby-plugin-netlify-cms/src/gatsby-node.js:57

    value.type === `javascript/auto` &&
    value.use &&
    value.use[0] &&
    value.use[0].options &&
    value.use[0].options.presets &&
    /babel-preset-gatsby[/\\]dependencies\.js/.test(
      value.use[0].options.presets
    )
  ) {
    return null
  }

  return value
}

exports.onPreInit = ({ reporter }) => {
  try {
    require.resolve(`netlify-cms`)
    reporter.warn(
      `The netlify-cms package is deprecated, please install netlify-cms-app instead. You can do this by running "npm install netlify-cms-app"`
    )
  } catch (err) {
    // carry on
  }
}

exports.onCreateDevServer = ({ app, store }, { publicPath = `admin` }) => {
  const { program } = store.getState()
  const publicPathClean = trim(publicPath, `/`)
  app.get(`/${publicPathClean}`, function (req, res) {
    res.sendFile(
      path.join(program.directory, `public`, publicPathClean, `index.html`),
      err => {
        if (err) {
          res.status(500).end(err.message)
        }
      }

View on GitHub (pinned to e85d62f177)

Solutions

  1. Run `npm install netlify-cms-app`
  2. Remove the deprecated netlify-cms dependency
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at deprecated-packages/gatsby-plugin-netlify-cms/src/gatsby-node.js:57 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26). Data as JSON: /api/errors/59e40187a0f97467. Report an issue: GitHub.