--- title: Addressing "App Container Deprecated" Error in Next.js description: This document guides developers on how to resolve the "App Container Deprecated" error in Next.js by updating their custom App component. --- ## Why This Error Occurred The "App Container Deprecated" error usually occurs when you are using the `` component in your custom `` (`pages/_app.js`). Prior to version `9.0.4` of Next.js, the `` component was used to handle scrolling to hashes. From version `9.0.4` onwards, this functionality was moved up the component tree, rendering the `` component unnecessary in your custom ``. ## Possible Ways to Fix It To resolve this issue, you need to remove the `` component from your custom `` (`pages/_app.js`). **Before** ```jsx filename="pages/_app.js" import React from 'react' import App, { Container } from 'next/app' class MyApp extends App { render() { const { Component, pageProps } = this.props return ( ) } } export default MyApp ``` **After** ```jsx filename="pages/_app.js" import React from 'react' import App from 'next/app' class MyApp extends App { render() { const { Component, pageProps } = this.props return } } export default MyApp ``` After making this change, your custom `` should work as expected without the `` component. ## Useful Links - [Custom App](/docs/pages/building-your-application/routing/custom-app)