"react-dom/server"=>"You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials".to_string(),
"react-dom/server"=>"You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials".to_string(),
// If importing "next/router", we should tell them to use "next/navigation".
// If importing "next/router", we should tell them to use "next/navigation".
"next/router"=>r#"You have a Server Component that imports next/router. Use next/navigation instead.\nLearn more: https://nextjs.org/docs/app/api-reference/functions/use-router"#.to_string(),
"next/router"=>r#"You have a Server Component that imports next/router. Use next/navigation instead.\nLearn more: https://nextjs.org/docs/app/api-reference/functions/use-router"#.to_string(),
_=>format!(r#"You're importing a component that imports {}. It only works in a Client Component but none of its parents are marked with "useclient", so they're Server Components by default.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials\n\n"#,source)
_=>format!(r#"You're importing a component that imports {source}. It only works in a Client Component but none of its parents are marked with "useclient", so they're Server Components by default.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials\n\n"#)
format!("You're importing a component that needs \"{}\". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components\n\n",source)
format!("You're importing a component that needs \"{source}\". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components\n\n")
}else{
}else{
format!("You're importing a component that needs \"{}\". That only works in a Server Component but one of its parents is marked with \"useclient\", so it's a Client Component.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials\n\n",source)
format!("You're importing a component that needs \"{source}\". That only works in a Server Component but one of its parents is marked with \"useclient\", so it's a Client Component.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials\n\n")
"You’re importing a class component. It only works in a Client Component but none of its parents are marked with \"useclient\", so they're Server Components by default.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials#client-components\n\n".to_string()
"You’re importing a class component. It only works in a Client Component but none of its parents are marked with \"useclient\", so they're Server Components by default.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials#client-components\n\n".to_string()
}else{
}else{
format!("You're importing a component that needs `{}`. This React hook only works in a client component. To fix, mark the file (or its parent) with the `\"useclient\"` directive.\n\n Learn more: https://nextjs.org/docs/app/building-your-application/rendering/client-components\n\n",source)
format!("You're importing a component that needs `{source}`. This React hook only works in a client component. To fix, mark the file (or its parent) with the `\"useclient\"` directive.\n\n Learn more: https://nextjs.org/docs/app/building-your-application/rendering/client-components\n\n")
format!("{} must be a Client Component. Add the \"useclient\" directive the top of the file to resolve this issue.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials#client-components\n\n",filepath),
format!("{filepath} must be a Client Component. Add the \"useclient\" directive the top of the file to resolve this issue.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials#client-components\n\n"),
(format!("You are attempting to export \"{}\" from a component marked with \"useclient\", which is disallowed. Either remove the export, or the \"useclient\" directive. Read more: https://nextjs.org/docs/getting-started/react-essentials#the-use-client-directive\n\n",source),span)
(format!("You are attempting to export \"{source}\" from a component marked with \"useclient\", which is disallowed. Either remove the export, or the \"useclient\" directive. Read more: https://nextjs.org/docs/getting-started/react-essentials#the-use-client-directive\n\n"),span)
"\"metadata\" and \"generateMetadata\" cannot be exported at the same time, please keep one of them. Read more: https://nextjs.org/docs/app/api-reference/file-conventions/metadata\n\n".to_string(),
"\"metadata\" and \"generateMetadata\" cannot be exported at the same time, please keep one of them. Read more: https://nextjs.org/docs/app/api-reference/file-conventions/metadata\n\n".to_string(),