Transforms the deprecated automatically injected `url` property on top level pages to using `withRouter` and the `router` property it injects. Read more here: [err.sh/next.js/url-deprecated](https://err.sh/next.js/url-deprecated)
Transforms the deprecated automatically injected `url` property on top level pages to using `withRouter` and the `router` property it injects. Read more here: [https://nextjs.org/docs/messages/url-deprecated](https://nextjs.org/docs/messages/url-deprecated)
> **Note**: Only assets that are in the `public` directory at [build time](/docs/api-reference/cli.md#build) will be served by Next.js. Files added at runtime won't be available. We recommend using a third party service like [AWS S3](https://aws.amazon.com/s3/) for persistent file storage.
> **Note**: Only assets that are in the `public` directory at [build time](/docs/api-reference/cli.md#build) will be served by Next.js. Files added at runtime won't be available. We recommend using a third party service like [AWS S3](https://aws.amazon.com/s3/) for persistent file storage.
`The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install react react-dom" https://err.sh/vercel/next.js/invalid-react-version`
`The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install react react-dom" https://nextjs.org/docs/messages/invalid-react-version`
`webpack build failed: found page without a React Component as default export in pages/${page_name}\n\nSee https://err.sh/vercel/next.js/page-without-valid-component for more info.`
`webpack build failed: found page without a React Component as default export in pages/${page_name}\n\nSee https://nextjs.org/docs/messages/page-without-valid-component for more info.`
)
)
}
}
...
@@ -611,7 +611,7 @@ export default async function build(
...
@@ -611,7 +611,7 @@ export default async function build(
error.indexOf('__next_polyfill__')>-1
error.indexOf('__next_polyfill__')>-1
){
){
thrownewError(
thrownewError(
'> webpack config.resolve.alias was incorrectly overridden. https://err.sh/vercel/next.js/invalid-resolve-alias'
'> webpack config.resolve.alias was incorrectly overridden. https://nextjs.org/docs/messages/invalid-resolve-alias'
)
)
}
}
thrownewError('> Build failed because of webpack errors')
thrownewError('> Build failed because of webpack errors')
...
@@ -719,7 +719,7 @@ export default async function build(
...
@@ -719,7 +719,7 @@ export default async function build(
@@ -1015,7 +1015,7 @@ export default async function getBaseWebpackConfig(
...
@@ -1015,7 +1015,7 @@ export default async function getBaseWebpackConfig(
...Object.keys(config.env).reduce((acc,key)=>{
...Object.keys(config.env).reduce((acc,key)=>{
if(/^(?:NODE_.+)|^(?:__.+)$/i.test(key)){
if(/^(?:NODE_.+)|^(?:__.+)$/i.test(key)){
thrownewError(
thrownewError(
`The key "${key}" under "env" in next.config.js is not allowed. https://err.sh/vercel/next.js/env-key-not-allowed`
`The key "${key}" under "env" in next.config.js is not allowed. https://nextjs.org/docs/messages/env-key-not-allowed`
)
)
}
}
...
@@ -1102,7 +1102,7 @@ export default async function getBaseWebpackConfig(
...
@@ -1102,7 +1102,7 @@ export default async function getBaseWebpackConfig(
new Proxy(${isServer?'process.env':'{}'}, {
new Proxy(${isServer?'process.env':'{}'}, {
get(target, prop) {
get(target, prop) {
if (typeof target[prop] === 'undefined') {
if (typeof target[prop] === 'undefined') {
console.warn(\`An environment variable (\${prop}) that was not provided in the environment was accessed.\nSee more info here: https://err.sh/next.js/missing-env-value\`)
console.warn(\`An environment variable (\${prop}) that was not provided in the environment was accessed.\nSee more info here: https://nextjs.org/docs/messages/missing-env-value\`)
}
}
return target[prop]
return target[prop]
}
}
...
@@ -1363,7 +1363,7 @@ export default async function getBaseWebpackConfig(
...
@@ -1363,7 +1363,7 @@ export default async function getBaseWebpackConfig(
if(!webpackConfig){
if(!webpackConfig){
thrownewError(
thrownewError(
'Webpack config is undefined. You may have forgot to return properly from within the "webpack" method of your next.config.js.\n'+
'Webpack config is undefined. You may have forgot to return properly from within the "webpack" method of your next.config.js.\n'+
'See more info here https://err.sh/next.js/undefined-webpack-config'
'See more info here https://nextjs.org/docs/messages/undefined-webpack-config'
)
)
}
}
...
@@ -1374,7 +1374,7 @@ export default async function getBaseWebpackConfig(
...
@@ -1374,7 +1374,7 @@ export default async function getBaseWebpackConfig(
if(typeof(webpackConfigasany).then==='function'){
if(typeof(webpackConfigasany).then==='function'){
console.warn(
console.warn(
'> Promise returned in next config. https://err.sh/vercel/next.js/promise-in-next-config'
'> Promise returned in next config. https://nextjs.org/docs/messages/promise-in-next-config'
)
)
}
}
}
}
...
@@ -1441,7 +1441,7 @@ export default async function getBaseWebpackConfig(
...
@@ -1441,7 +1441,7 @@ export default async function getBaseWebpackConfig(
chalk.bold(
chalk.bold(
'Built-in CSS support is being disabled due to custom CSS configuration being detected.\n'
'Built-in CSS support is being disabled due to custom CSS configuration being detected.\n'
)+
)+
'See here for more info: https://err.sh/next.js/built-in-css-disabled\n'
'See here for more info: https://nextjs.org/docs/messages/built-in-css-disabled\n'
@@ -206,7 +206,7 @@ function Link(props: React.PropsWithChildren<LinkProps>) {
...
@@ -206,7 +206,7 @@ function Link(props: React.PropsWithChildren<LinkProps>) {
if(props.prefetch&&!hasWarned.current){
if(props.prefetch&&!hasWarned.current){
hasWarned.current=true
hasWarned.current=true
console.warn(
console.warn(
'Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/vercel/next.js/prefetch-true-deprecated'
'Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated'
@@ -181,7 +181,7 @@ export default async function exportApp(
...
@@ -181,7 +181,7 @@ export default async function exportApp(
if(!existsSync(buildIdFile)){
if(!existsSync(buildIdFile)){
thrownewError(
thrownewError(
`Could not find a production build in the '${distDir}' directory. Try building your app with 'next build' before starting the static export. https://err.sh/vercel/next.js/next-export-no-build-id`
`Could not find a production build in the '${distDir}' directory. Try building your app with 'next build' before starting the static export. https://nextjs.org/docs/messages/next-export-no-build-id`
)
)
}
}
...
@@ -197,7 +197,7 @@ export default async function exportApp(
...
@@ -197,7 +197,7 @@ export default async function exportApp(
Log.warn(
Log.warn(
`rewrites, redirects, and headers are not applied when exporting your application, detected (${customRoutesDetected.join(
`rewrites, redirects, and headers are not applied when exporting your application, detected (${customRoutesDetected.join(
', '
', '
)}). See more info here: https://err.sh/next.js/export-no-custom-routes`
)}). See more info here: https://nextjs.org/docs/messages/export-no-custom-routes`
)
)
}
}
...
@@ -251,13 +251,13 @@ export default async function exportApp(
...
@@ -251,13 +251,13 @@ export default async function exportApp(
if(outDir===join(dir,'public')){
if(outDir===join(dir,'public')){
thrownewError(
thrownewError(
`The 'public' directory is reserved in Next.js and can not be used as the export out directory. https://err.sh/vercel/next.js/can-not-output-to-public`
`The 'public' directory is reserved in Next.js and can not be used as the export out directory. https://nextjs.org/docs/messages/can-not-output-to-public`
)
)
}
}
if(outDir===join(dir,'static')){
if(outDir===join(dir,'static')){
thrownewError(
thrownewError(
`The 'static' directory is reserved in Next.js and can not be used as the export out directory. https://err.sh/vercel/next.js/can-not-output-to-static`
`The 'static' directory is reserved in Next.js and can not be used as the export out directory. https://nextjs.org/docs/messages/can-not-output-to-static`
)
)
}
}
...
@@ -345,7 +345,7 @@ export default async function exportApp(
...
@@ -345,7 +345,7 @@ export default async function exportApp(
- Use any provider which supports Image Optimization (like Vercel).
- Use any provider which supports Image Optimization (like Vercel).
- Configure a third-party loader in \`next.config.js\`.
- Configure a third-party loader in \`next.config.js\`.
exportconstPUBLIC_DIR_MIDDLEWARE_CONFLICT=`You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://err.sh/vercel/next.js/public-next-folder-conflict`
exportconstPUBLIC_DIR_MIDDLEWARE_CONFLICT=`You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`
exportconstSSG_GET_INITIAL_PROPS_CONFLICT=`You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`
exportconstSSG_GET_INITIAL_PROPS_CONFLICT=`You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`
...
@@ -30,9 +30,9 @@ export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialP
...
@@ -30,9 +30,9 @@ export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialP
exportconstSERVER_PROPS_SSG_CONFLICT=`You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`
exportconstSERVER_PROPS_SSG_CONFLICT=`You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`
exportconstSTATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR=`can not have getInitialProps/getServerSideProps, https://err.sh/next.js/404-get-initial-props`
exportconstSTATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR=`can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`
exportconstSERVER_PROPS_EXPORT_ERROR=`pages with \`getServerSideProps\` can not be exported. See more info here: https://err.sh/next.js/gssp-export`
exportconstSERVER_PROPS_EXPORT_ERROR=`pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`
exportconstGSP_NO_RETURNED_VALUE=
exportconstGSP_NO_RETURNED_VALUE=
'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'
'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'
'The `unstable_revalidate` property is available for general use.\n'+
'The `unstable_revalidate` property is available for general use.\n'+
'Please use `revalidate` instead.'
'Please use `revalidate` instead.'
exportconstGSSP_COMPONENT_MEMBER_ERROR=`can not be attached to a page's component and must be exported from the page. See more info here: https://err.sh/next.js/gssp-component-member`
exportconstGSSP_COMPONENT_MEMBER_ERROR=`can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`
exportconstNON_STANDARD_NODE_ENV=`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://err.sh/next.js/non-standard-node-env`
exportconstNON_STANDARD_NODE_ENV=`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`
exportconstSSG_FALLBACK_EXPORT_ERROR=`Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://err.sh/next.js/ssg-fallback-true-export`
exportconstSSG_FALLBACK_EXPORT_ERROR=`Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`
`${type}s must return an array, received ${typeofroutes}.\n`+
`${type}s must return an array, received ${typeofroutes}.\n`+
`See here for more info: https://err.sh/next.js/routes-must-be-array`
`See here for more info: https://nextjs.org/docs/messages/routes-must-be-array`
)
)
}
}
...
@@ -218,7 +218,7 @@ function checkCustomRoutes(
...
@@ -218,7 +218,7 @@ function checkCustomRoutes(
console.error(
console.error(
`The route ${
`The route ${
(routeasRewrite).source
(routeasRewrite).source
} rewrites urls outside of the basePath. Please use a destination that starts with \`http://\` or \`https://\` https://err.sh/vercel/next.js/invalid-external-rewrite`
} rewrites urls outside of the basePath. Please use a destination that starts with \`http://\` or \`https://\` https://nextjs.org/docs/messages/invalid-external-rewrite`
@@ -236,7 +236,7 @@ export default function prepareDestination(
...
@@ -236,7 +236,7 @@ export default function prepareDestination(
}catch(err){
}catch(err){
if(err.message.match(/Expected .*? to not repeat, but got an array/)){
if(err.message.match(/Expected .*? to not repeat, but got an array/)){
thrownewError(
thrownewError(
`To use a multi-match in the destination you must add \`*\` at the end of the param name to signify it should repeat. https://err.sh/vercel/next.js/invalid-multi-match`
`To use a multi-match in the destination you must add \`*\` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match`
@@ -318,7 +318,7 @@ export async function loadGetInitialProps<
...
@@ -318,7 +318,7 @@ export async function loadGetInitialProps<
if(App.prototype?.getInitialProps){
if(App.prototype?.getInitialProps){
constmessage=`"${getDisplayName(
constmessage=`"${getDisplayName(
App
App
)}.getInitialProps()" is defined as an instance method - visit https://err.sh/vercel/next.js/get-initial-props-as-an-instance-method for more information.`
)}.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`
thrownewError(message)
thrownewError(message)
}
}
}
}
...
@@ -353,7 +353,7 @@ export async function loadGetInitialProps<
...
@@ -353,7 +353,7 @@ export async function loadGetInitialProps<
console.warn(
console.warn(
`${getDisplayName(
`${getDisplayName(
App
App
)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://err.sh/vercel/next.js/empty-object-getInitialProps`
)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`
@@ -1253,7 +1253,7 @@ export default class Server {
...
@@ -1253,7 +1253,7 @@ export default class Server {
):Promise<void>{
):Promise<void>{
if(!pathname.startsWith('/')){
if(!pathname.startsWith('/')){
console.warn(
console.warn(
`Cannot render page with path "${pathname}", did you mean "/${pathname}"?. See more info here: https://err.sh/next.js/render-no-starting-slash`
`Cannot render page with path "${pathname}", did you mean "/${pathname}"?. See more info here: https://nextjs.org/docs/messages/render-no-starting-slash`
)
)
}
}
...
@@ -1933,7 +1933,7 @@ export default class Server {
...
@@ -1933,7 +1933,7 @@ export default class Server {
console.warn(
console.warn(
chalk.bold.yellow(`Warning: `)+
chalk.bold.yellow(`Warning: `)+
chalk.yellow(
chalk.yellow(
`You have added a custom /_error page without a custom /404 page. This prevents the 404 page from being auto statically optimized.\nSee here for info: https://err.sh/next.js/custom-error-no-custom-404`
`You have added a custom /_error page without a custom /404 page. This prevents the 404 page from being auto statically optimized.\nSee here for info: https://nextjs.org/docs/messages/custom-error-no-custom-404`
)
)
)
)
})
})
...
@@ -2133,7 +2133,7 @@ export default class Server {
...
@@ -2133,7 +2133,7 @@ export default class Server {
}catch(err){
}catch(err){
if(!fs.existsSync(buildIdFile)){
if(!fs.existsSync(buildIdFile)){
thrownewError(
thrownewError(
`Could not find a production build in the '${this.distDir}' directory. Try building your app with 'next build' before starting the production server. https://err.sh/vercel/next.js/production-start-no-build-id`
`Could not find a production build in the '${this.distDir}' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id`
@@ -406,14 +406,14 @@ export class Head extends Component<
...
@@ -406,14 +406,14 @@ export class Head extends Component<
if(!isReactHelmet){
if(!isReactHelmet){
if(child?.type==='title'){
if(child?.type==='title'){
console.warn(
console.warn(
"Warning: <title> should not be used in _document.js's <Head>. https://err.sh/next.js/no-document-title"
"Warning: <title> should not be used in _document.js's <Head>. https://nextjs.org/docs/messages/no-document-title"
)
)
}elseif(
}elseif(
child?.type==='meta'&&
child?.type==='meta'&&
child?.props?.name==='viewport'
child?.props?.name==='viewport'
){
){
console.warn(
console.warn(
"Warning: viewport meta tags should not be used in _document.js's <Head>. https://err.sh/next.js/no-document-viewport-meta"
"Warning: viewport meta tags should not be used in _document.js's <Head>. https://nextjs.org/docs/messages/no-document-viewport-meta"
)
)
}
}
}
}
...
@@ -421,7 +421,7 @@ export class Head extends Component<
...
@@ -421,7 +421,7 @@ export class Head extends Component<
})
})
if(this.props.crossOrigin)
if(this.props.crossOrigin)
console.warn(
console.warn(
'Warning: `Head` attribute `crossOrigin` is deprecated. https://err.sh/next.js/doc-crossorigin-deprecated'
'Warning: `Head` attribute `crossOrigin` is deprecated. https://nextjs.org/docs/messages/doc-crossorigin-deprecated'
)
)
}
}
...
@@ -471,7 +471,7 @@ export class Head extends Component<
...
@@ -471,7 +471,7 @@ export class Head extends Component<
if(badProp){
if(badProp){
console.warn(
console.warn(
`Found conflicting amp tag "${child.type}" with conflicting prop ${badProp} in ${__NEXT_DATA__.page}. https://err.sh/next.js/conflicting-amp-tag`
`Found conflicting amp tag "${child.type}" with conflicting prop ${badProp} in ${__NEXT_DATA__.page}. https://nextjs.org/docs/messages/conflicting-amp-tag`
)
)
returnnull
returnnull
}
}
...
@@ -763,7 +763,7 @@ export class NextScript extends Component<OriginProps> {
...
@@ -763,7 +763,7 @@ export class NextScript extends Component<OriginProps> {
}catch(err){
}catch(err){
if(err.message.indexOf('circular structure')){
if(err.message.indexOf('circular structure')){
thrownewError(
thrownewError(
`Circular structure in "getInitialProps" result of page "${__NEXT_DATA__.page}". https://err.sh/vercel/next.js/circular-structure`
`Circular structure in "getInitialProps" result of page "${__NEXT_DATA__.page}". https://nextjs.org/docs/messages/circular-structure`
)
)
}
}
throwerr
throwerr
...
@@ -828,7 +828,7 @@ export class NextScript extends Component<OriginProps> {
...
@@ -828,7 +828,7 @@ export class NextScript extends Component<OriginProps> {
if(process.env.NODE_ENV!=='production'){
if(process.env.NODE_ENV!=='production'){
if(this.props.crossOrigin)
if(this.props.crossOrigin)
console.warn(
console.warn(
'Warning: `NextScript` attribute `crossOrigin` is deprecated. https://err.sh/next.js/doc-crossorigin-deprecated'
'Warning: `NextScript` attribute `crossOrigin` is deprecated. https://nextjs.org/docs/messages/doc-crossorigin-deprecated'
@@ -43,7 +43,7 @@ import { NextConfig } from '../next-server/server/config'
...
@@ -43,7 +43,7 @@ import { NextConfig } from '../next-server/server/config'
if(typeofReact.Suspense==='undefined'){
if(typeofReact.Suspense==='undefined'){
thrownewError(
thrownewError(
`The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install react react-dom" https://err.sh/vercel/next.js/invalid-react-version`
`The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install react react-dom" https://nextjs.org/docs/messages/invalid-react-version`
)
)
}
}
...
@@ -94,7 +94,7 @@ export default class DevServer extends Server {
...
@@ -94,7 +94,7 @@ export default class DevServer extends Server {
}
}
if(fs.existsSync(pathJoin(this.dir,'static'))){
if(fs.existsSync(pathJoin(this.dir,'static'))){
console.warn(
console.warn(
`The static directory has been deprecated in favor of the public directory. https://err.sh/vercel/next.js/static-dir-deprecated`
`The static directory has been deprecated in favor of the public directory. https://nextjs.org/docs/messages/static-dir-deprecated`
)
)
}
}
this.isCustomServer=!options.isNextDevCommand
this.isCustomServer=!options.isNextDevCommand
...
@@ -362,7 +362,7 @@ export default class DevServer extends Server {
...
@@ -362,7 +362,7 @@ export default class DevServer extends Server {
if(awaitthis.hasPublicFile(decodedPath)){
if(awaitthis.hasPublicFile(decodedPath)){
if(awaitthis.hasPage(pathname!)){
if(awaitthis.hasPage(pathname!)){
consterr=newError(
consterr=newError(
`A conflicting public file and page file was found for path ${pathname} https://err.sh/vercel/next.js/conflicting-public-file-page`
`A conflicting public file and page file was found for path ${pathname} https://nextjs.org/docs/messages/conflicting-public-file-page`
)
)
res.statusCode=500
res.statusCode=500
awaitthis.renderError(err,req,res,pathname!,{})
awaitthis.renderError(err,req,res,pathname!,{})
...
@@ -662,7 +662,7 @@ export default class DevServer extends Server {
...
@@ -662,7 +662,7 @@ export default class DevServer extends Server {
if(!err&&res.statusCode===500){
if(!err&&res.statusCode===500){
err=newError(
err=newError(
'An undefined error was thrown sometime during render... '+
'An undefined error was thrown sometime during render... '+
'"InstanceInitialPropsPage.getInitialProps()" is defined as an instance method - visit https://err.sh/vercel/next.js/get-initial-props-as-an-instance-method for more information.'
'"InstanceInitialPropsPage.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.'
`The route /hello rewrites urls outside of the basePath. Please use a destination that starts with \`http://\` or \`https://\` https://err.sh/vercel/next.js/invalid-external-rewrite`
`The route /hello rewrites urls outside of the basePath. Please use a destination that starts with \`http://\` or \`https://\` https://nextjs.org/docs/messages/invalid-external-rewrite`
'The provided `as` value (/blog/post-1) is incompatible with the `href` value (/[post]). Read more: https://err.sh/vercel/next.js/incompatible-href-as'
'The provided `as` value (/blog/post-1) is incompatible with the `href` value (/[post]). Read more: https://nextjs.org/docs/messages/incompatible-href-as'
it('should throw an error when building with next',async()=>{
it('should throw an error when building with next',async()=>{
expect(()=>require(nextBin)).toThrow(
expect(()=>require(nextBin)).toThrow(
/The version of React you are using is lower than the minimum required version needed for Next\.js\. Please upgrade "react" and "react-dom": "npm install react react-dom" https:\/\/err\.sh/
/The version of React you are using is lower than the minimum required version needed for Next\.js\. Please upgrade "react" and "react-dom": "npm install react react-dom" https:\/\//
'"TestComponent.getInitialProps()" is defined as an instance method - visit https://err.sh/vercel/next.js/get-initial-props-as-an-instance-method for more information.'
'"TestComponent.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.'